|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--asgaard.utils.cryptography.Cryptography
Class Cryptography is the abstract class that contains abstract forms of all cryptography functions (the methods here will just throw no such method exceptions). Individual subclasses will implement different cryptographic algorithms, but application programmers should primarily program against this interface.
Copyright © 1997 David Purdue.
Constructor Summary | |
Cryptography()
|
Method Summary | |
byte[] |
decrypt(byte[] ciphertext)
Place holder for decryption. |
byte[] |
decryptFinish()
Place holder for decryption tidy up. |
byte[] |
encrypt(byte[] plaintext)
Place holder for encryption function. |
byte[] |
encryptFinish()
Place holder for encryption tidy up. |
static Cryptography |
getCrypto(java.lang.String cryptoName)
The getCrypto method takes the name of a cryptographic algorithm and generates an object that implements it. |
byte[] |
getKey()
Place holder for getting a key. |
void |
setKey(byte[] key)
Place holder for setting a key. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Cryptography()
Method Detail |
public static Cryptography getCrypto(java.lang.String cryptoName) throws NoSuchCryptoException
cryptoName
- The name of the algorithm to use.public byte[] encrypt(byte[] plaintext) throws java.lang.NoSuchMethodException
plaintext
- The plain text to encrypt as an array of bytes.public byte[] encryptFinish() throws java.lang.NoSuchMethodException
public byte[] decrypt(byte[] ciphertext) throws java.lang.NoSuchMethodException
ciphertext
- The cipher text to decrypt, an array of bytes.public byte[] decryptFinish() throws java.lang.NoSuchMethodException
public void setKey(byte[] key) throws java.lang.NoSuchMethodException
key
- an array of bytes containing the key.public byte[] getKey() throws java.lang.NoSuchMethodException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |