Exemple #1
0
        private int getMaxSecurityStrength(Org.BouncyCastle.Crypto.Internal.IBlockCipher cipher, int keySizeInBits)
        {
            if (isTDEA(cipher) && keySizeInBits == 168)
            {
                return(112);
            }
            if (cipher.AlgorithmName.Equals("AES"))
            {
                return(keySizeInBits);
            }

            return(-1);
        }
Exemple #2
0
 private bool isTDEA(Org.BouncyCastle.Crypto.Internal.IBlockCipher cipher)
 {
     return(cipher.AlgorithmName.Equals("DESede") || cipher.AlgorithmName.Equals("TDEA"));
 }