|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object memetic.crypto.DESCrypt
public class DESCrypt
Encrypts and Decrypts using the DES Algorithm
Field Summary | |
---|---|
static java.lang.String |
TYPE
The DES encryption type |
Constructor Summary | |
---|---|
DESCrypt(java.lang.String password)
Creates a new DESCrypt |
Method Summary | |
---|---|
int |
decrypt(byte[] input,
int offset,
int length,
byte[] output,
int outOffset)
Decrypts the input |
int |
encrypt(byte[] input,
int offset,
int length,
byte[] output,
int outOffset)
Encrypts the input |
int |
getBlockSize()
Returns the size of the block of the encryption or decryption |
int |
getDecryptOutputSize(int inputSize)
Returns the maximum size the output buffer needs to be |
int |
getEncryptOutputSize(int inputSize)
Returns the maximum size the output buffer needs to be |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TYPE
Constructor Detail |
---|
public DESCrypt(java.lang.String password)
password
- The password to crypt withMethod Detail |
---|
public int encrypt(byte[] input, int offset, int length, byte[] output, int outOffset) throws javax.crypto.ShortBufferException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException
Crypt
encrypt
in interface Crypt
input
- The input to be encryptedoffset
- The offset into the input buffer where the input startslength
- The length of the inputoutput
- The output bufferoutOffset
- The offset into the output buffer where to store the output
javax.crypto.BadPaddingException
javax.crypto.IllegalBlockSizeException
javax.crypto.ShortBufferException
java.security.InvalidAlgorithmParameterException
java.security.InvalidKeyException
Crypt.encrypt(byte[], int, int, byte[], int)
public int decrypt(byte[] input, int offset, int length, byte[] output, int outOffset) throws javax.crypto.ShortBufferException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException
Crypt
decrypt
in interface Crypt
input
- The input to be decryptedoffset
- The offset into the input buffer where the input startslength
- The length of the inputoutput
- The output bufferoutOffset
- The offset into the output buffer where to store the output
javax.crypto.BadPaddingException
javax.crypto.IllegalBlockSizeException
javax.crypto.ShortBufferException
java.security.InvalidAlgorithmParameterException
java.security.InvalidKeyException
Crypt.decrypt(byte[], int, int, byte[], int)
public int getEncryptOutputSize(int inputSize)
Crypt
getEncryptOutputSize
in interface Crypt
inputSize
- The size of the input to be encrypted
Crypt.getEncryptOutputSize(int)
public int getDecryptOutputSize(int inputSize)
Crypt
getDecryptOutputSize
in interface Crypt
inputSize
- The size of the input to be decrypted
Crypt.getDecryptOutputSize(int)
public int getBlockSize()
Crypt
getBlockSize
in interface Crypt
Crypt.getBlockSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |