Class FPEFF3_1Engine

java.lang.Object
org.bouncycastle.crypto.fpe.FPEEngine
org.bouncycastle.crypto.fpe.FPEFF3_1Engine

public class FPEFF3_1Engine extends FPEEngine
NIST SP 800-38G, FF3-1 format preserving encryption.
  • Constructor Details

    • FPEFF3_1Engine

      public FPEFF3_1Engine()
      Base constructor - the engine will use AES.
    • FPEFF3_1Engine

      public FPEFF3_1Engine(BlockCipher baseCipher)
      Build the engine using the specified 128 bit block cipher.
      Parameters:
      baseCipher - cipher to base the FPE algorithm on.
  • Method Details

    • init

      public void init(boolean forEncryption, CipherParameters parameters)
      Description copied from class: FPEEngine
      Initialize the FPE engine for encryption/decryption.
      Specified by:
      init in class FPEEngine
      Parameters:
      forEncryption - true if initialising for encryption, false otherwise.
      parameters - the key and other parameters to use to set the engine up.
    • getAlgorithmName

      public String getAlgorithmName()
      Description copied from class: FPEEngine
      Return the name of the algorithm the cipher implements.
      Specified by:
      getAlgorithmName in class FPEEngine
      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 class FPEEngine
    • decryptBlock

      protected int decryptBlock(byte[] inBuf, int inOff, int length, byte[] outBuf, int outOff)
      Specified by:
      decryptBlock in class FPEEngine