Class Overview
A class that provides Blowfish key encryption operations, such as encoding
data and generating keys. All the algorithms herein are from Applied
Cryptography and implement a simplified cryptography interface.
Summary
| Fields |
|
private
static
final
int[] |
KP |
|
|
private
static
final
int[] |
KS0 |
|
|
private
static
final
int[] |
KS1 |
|
|
private
static
final
int[] |
KS2 |
|
|
private
static
final
int[] |
KS3 |
|
|
private
final
int[] |
P |
|
|
private
final
int[] |
S0 |
|
|
private
final
int[] |
S1 |
|
|
private
final
int[] |
S2 |
|
|
private
final
int[] |
S3 |
|
|
private
boolean |
doEncrypt |
|
|
private
byte[] |
workingKey |
|
Constants
private
static
final
int
BLOCK_SIZE
Constant Value:
8
(0x00000008)
private
static
final
int
P_SZ
Constant Value:
18
(0x00000012)
private
static
final
int
ROUNDS
Constant Value:
16
(0x00000010)
private
static
final
int
SBOX_SK
Constant Value:
256
(0x00000100)
Fields
private
static
final
int[]
KP
private
static
final
int[]
KS0
private
static
final
int[]
KS1
private
static
final
int[]
KS2
private
static
final
int[]
KS3
private
boolean
doEncrypt
private
byte[]
workingKey
Public Constructors
Public Methods
public
String
getAlgorithmName
()
public
int
getBlockSize
()
public
void
init
(boolean encrypting, byte[] key)
initialise a Blowfish cipher.
Parameters
| encrypting
| Whether or not we are for encryption. |
| key
| The key required to set up the cipher. |
public
final
void
transformBlock
(byte[] in, int inOff, byte[] out, int outOff)