public class BlowfishCipher extends Object
| Constructor and Description |
|---|
BlowfishCipher(byte[] blowfishKey)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cipher(byte[] data)
Cipher the given byte-array with Blowfish cipher
|
void |
cipher(byte[] data,
int offset,
int length)
Cipher the given byte-array with Blowfish cipher
|
void |
decipher(byte[] data)
Decipher the given byte-array with Blowfish cipher
|
void |
decipher(byte[] data,
int offset,
int length)
Decipher the given byte-array with Blowfish cipher
|
void |
updateKey(byte[] blowfishKey)
Update current blowfish key with the new one and reinitialize the P-array
and S-boxes
|
public BlowfishCipher(byte[] blowfishKey)
blowfishKey - Blowfish Keypublic void updateKey(byte[] blowfishKey)
blowfishKey - new blowfish keypublic void cipher(byte[] data)
data - byte array to be cipheredpublic void cipher(byte[] data,
int offset,
int length)
data - byte array to be cipheredoffset - byte array offsetlength - byte array lengthpublic void decipher(byte[] data)
data - byte array to be decipheredpublic void decipher(byte[] data,
int offset,
int length)
data - byte array to be decipheredoffset - byte array offsetlength - byte array lengthCopyright © 2014–2015. All rights reserved.