Package org.bouncycastle.crypto.fpe
Class FPEFF1Engine
- java.lang.Object
-
- org.bouncycastle.crypto.fpe.FPEEngine
-
- org.bouncycastle.crypto.fpe.FPEFF1Engine
-
public class FPEFF1Engine extends FPEEngine
NIST SP 800-38G, FF1 format preserving encryption.
-
-
Field Summary
-
Fields inherited from class org.bouncycastle.crypto.fpe.FPEEngine
baseCipher, forEncryption, fpeParameters
-
-
Constructor Summary
Constructors Constructor Description FPEFF1Engine()Base constructor - the engine will use AES.FPEFF1Engine(BlockCipher baseCipher)Build the engine using the specified 128 bit block cipher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intdecryptBlock(byte[] inBuf, int inOff, int length, byte[] outBuf, int outOff)protected intencryptBlock(byte[] inBuf, int inOff, int length, byte[] outBuf, int outOff)java.lang.StringgetAlgorithmName()Return the name of the algorithm the cipher implements.voidinit(boolean forEncryption, CipherParameters parameters)Initialize the FPE engine for encryption/decryption.-
Methods inherited from class org.bouncycastle.crypto.fpe.FPEEngine
processBlock, toByteArray, toShortArray
-
-
-
-
Constructor Detail
-
FPEFF1Engine
public FPEFF1Engine()
Base constructor - the engine will use AES.
-
FPEFF1Engine
public FPEFF1Engine(BlockCipher baseCipher)
Build the engine using the specified 128 bit block cipher.- Parameters:
baseCipher- cipher to base the FPE algorithm on.
-
-
Method Detail
-
init
public void init(boolean forEncryption, CipherParameters parameters)Description copied from class:FPEEngineInitialize the FPE engine for encryption/decryption.
-
getAlgorithmName
public java.lang.String getAlgorithmName()
Description copied from class:FPEEngineReturn the name of the algorithm the cipher implements.- Specified by:
getAlgorithmNamein 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:
encryptBlockin classFPEEngine
-
decryptBlock
protected int decryptBlock(byte[] inBuf, int inOff, int length, byte[] outBuf, int outOff)- Specified by:
decryptBlockin classFPEEngine
-
-