public readonly int KeyLength; // In Bits public Cipher(CipherType type, int iVLength, SupportedCipherMode mode, int keyLength) { // Initialization Type = type; IVLength = iVLength; Mode = mode; KeyLength = keyLength; }
private static bool TryGetDotNetCipherMode(SupportedCipherMode mode, out CipherMode result) { switch (mode) { case SupportedCipherMode.CBC: result = CipherMode.CBC; return(true); case SupportedCipherMode.ECB: result = CipherMode.ECB; return(true); default: result = default; return(false); } }