|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcrypto.MyCryptoAgent
public class MyCryptoAgent
| Field Summary |
|---|
| Fields inherited from interface support.crypto.CryptoAgent |
|---|
BIG_INT_SEED_BITS, E_VALUE, PRIME_CHECK_PRECISION |
| Constructor Summary | |
|---|---|
MyCryptoAgent()
You should generate values for _p, _q, _phiN, and _d here. |
|
| Method Summary | |
|---|---|
byte[] |
decrypt(byte[] cipher)
Decrypt cipher using your private key (_d). |
byte[] |
encrypt(CryptoPublicKey key,
byte[] message)
Encrypt the given message using the provided public key. |
CryptoPublicKey |
getPublicKey()
Return a CryptoPublicKey that contains your N and E values. |
static void |
main(String[] argv)
Since a visualizer for this assignment would be a little complicated to test we decided to provide this little text based driver instead. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MyCryptoAgent()
| Method Detail |
|---|
public CryptoPublicKey getPublicKey()
getPublicKey in interface CryptoAgentpublic byte[] decrypt(byte[] cipher)
decrypt in interface CryptoAgentcipher - an array of bytes representing an encrypted message.
public byte[] encrypt(CryptoPublicKey key,
byte[] message)
encrypt in interface CryptoAgentkey - the public key to be used for the encryption.message - the message to be encrypted.
public static void main(String[] argv)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||