Class FpeEngine
- Namespace
- Org.BouncyCastle.Crypto.Fpe
- Assembly
- BouncyCastle.Cryptography.dll
Base class for format-preserving encryption.
public abstract class FpeEngine
- Inheritance
-
FpeEngine
- Derived
- Inherited Members
Constructors
FpeEngine(IBlockCipher)
protected FpeEngine(IBlockCipher baseCipher)
Parameters
baseCipherIBlockCipher
Fields
baseCipher
protected readonly IBlockCipher baseCipher
Field Value
forEncryption
protected bool forEncryption
Field Value
fpeParameters
protected FpeParameters fpeParameters
Field Value
Methods
DecryptBlock(byte[], int, int, byte[], int)
protected abstract int DecryptBlock(byte[] inBuf, int inOff, int length, byte[] outBuf, int outOff)
Parameters
Returns
EncryptBlock(byte[], int, int, byte[], int)
protected abstract int EncryptBlock(byte[] inBuf, int inOff, int length, byte[] outBuf, int outOff)
Parameters
Returns
Init(bool, ICipherParameters)
Initialize the FPE engine for encryption/decryption.
public abstract void Init(bool forEncryption, ICipherParameters parameters)
Parameters
forEncryptionbooltrue if initialising for encryption, false otherwise.
parametersICipherParameters
IsOverrideSet(string)
protected static bool IsOverrideSet(string propName)
Parameters
propNamestring
Returns
ProcessBlock(byte[], int, int, byte[], int)
Process length bytes from inBuf, writing the output to outBuf.
public virtual int ProcessBlock(byte[] inBuf, int inOff, int length, byte[] outBuf, int outOff)
Parameters
inBufbyte[]input data.
inOffintoffset in input data to start at.
lengthintnumber of bytes to process.
outBufbyte[]destination buffer.
outOffintoffset to start writing at in destination buffer.
Returns
- int
number of bytes output.