<PackageReference Include="BouncyCastle.Cryptography" Version="2.6.2" />

Org.BouncyCastle.Crypto.Fpe.FpeEngine

public abstract class FpeEngine
Base class for format-preserving encryption.
namespace Org.BouncyCastle.Crypto.Fpe { public abstract class FpeEngine { protected readonly IBlockCipher baseCipher; protected bool forEncryption; protected FpeParameters fpeParameters; protected FpeEngine(IBlockCipher baseCipher); public virtual int ProcessBlock(byte[] inBuf, int inOff, int length, byte[] outBuf, int outOff); protected static bool IsOverrideSet(string propName); public abstract void Init(bool forEncryption, ICipherParameters parameters); protected abstract int EncryptBlock(byte[] inBuf, int inOff, int length, byte[] outBuf, int outOff); protected abstract int DecryptBlock(byte[] inBuf, int inOff, int length, byte[] outBuf, int outOff); } }