示例#1
0
            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;
            }
示例#2
0
        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);
            }
        }