Package org.bouncycastle.crypto.fpe
Class FPEFF3_1Engine
java.lang.Object
org.bouncycastle.crypto.fpe.FPEEngine
org.bouncycastle.crypto.fpe.FPEFF3_1Engine
NIST SP 800-38G, FF3-1 format preserving encryption.
-
Field Summary
Fields inherited from class org.bouncycastle.crypto.fpe.FPEEngine
baseCipher, forEncryption, fpeParameters
-
Constructor Summary
ConstructorDescriptionBase constructor - the engine will use AES.FPEFF3_1Engine
(BlockCipher baseCipher) Build the engine using the specified 128 bit block cipher. -
Method Summary
Modifier and TypeMethodDescriptionprotected int
decryptBlock
(byte[] inBuf, int inOff, int length, byte[] outBuf, int outOff) protected int
encryptBlock
(byte[] inBuf, int inOff, int length, byte[] outBuf, int outOff) Return the name of the algorithm the cipher implements.void
init
(boolean forEncryption, CipherParameters parameters) Initialize the FPE engine for encryption/decryption.Methods inherited from class org.bouncycastle.crypto.fpe.FPEEngine
processBlock, toByteArray, toShortArray
-
Constructor Details
-
FPEFF3_1Engine
public FPEFF3_1Engine()Base constructor - the engine will use AES. -
FPEFF3_1Engine
Build the engine using the specified 128 bit block cipher.- Parameters:
baseCipher
- cipher to base the FPE algorithm on.
-
-
Method Details
-
init
Description copied from class:FPEEngine
Initialize the FPE engine for encryption/decryption. -
getAlgorithmName
Description copied from class:FPEEngine
Return the name of the algorithm the cipher implements.- Specified by:
getAlgorithmName
in classFPEEngine
- Returns:
- the name of the algorithm the cipher implements.
-
encryptBlock
protected int encryptBlock(byte[] inBuf, int inOff, int length, byte[] outBuf, int outOff) - Specified by:
encryptBlock
in classFPEEngine
-
decryptBlock
protected int decryptBlock(byte[] inBuf, int inOff, int length, byte[] outBuf, int outOff) - Specified by:
decryptBlock
in classFPEEngine
-