Table of Contents

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

baseCipher IBlockCipher

Fields

baseCipher

protected readonly IBlockCipher baseCipher

Field Value

IBlockCipher

forEncryption

protected bool forEncryption

Field Value

bool

fpeParameters

protected FpeParameters fpeParameters

Field Value

FpeParameters

Methods

DecryptBlock(byte[], int, int, byte[], int)

protected abstract int DecryptBlock(byte[] inBuf, int inOff, int length, byte[] outBuf, int outOff)

Parameters

inBuf byte[]
inOff int
length int
outBuf byte[]
outOff int

Returns

int

EncryptBlock(byte[], int, int, byte[], int)

protected abstract int EncryptBlock(byte[] inBuf, int inOff, int length, byte[] outBuf, int outOff)

Parameters

inBuf byte[]
inOff int
length int
outBuf byte[]
outOff int

Returns

int

Init(bool, ICipherParameters)

Initialize the FPE engine for encryption/decryption.

public abstract void Init(bool forEncryption, ICipherParameters parameters)

Parameters

forEncryption bool

true if initialising for encryption, false otherwise.

parameters ICipherParameters

IsOverrideSet(string)

protected static bool IsOverrideSet(string propName)

Parameters

propName string

Returns

bool

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

inBuf byte[]

input data.

inOff int

offset in input data to start at.

length int

number of bytes to process.

outBuf byte[]

destination buffer.

outOff int

offset to start writing at in destination buffer.

Returns

int

number of bytes output.