private RijndaelManaged CreateCipher(CommonSymmetricCryptoArguments arguments)
 {
     var cipher = new RijndaelManaged();
     cipher.KeySize = arguments.KeySize;
     cipher.BlockSize = arguments.BlockSize;
     cipher.Padding = arguments.PaddingMode;
     cipher.Mode = arguments.CipherMode;
     byte[] key = HexToByteArray(arguments.SymmetricPublicKey);
     cipher.Key = key;
     return cipher;
 }
Exemplo n.º 2
0
        private RijndaelManaged CreateCipher(CommonSymmetricCryptoArguments arguments)
        {
            var cipher = new RijndaelManaged();

            cipher.KeySize   = arguments.KeySize;
            cipher.BlockSize = arguments.BlockSize;
            cipher.Padding   = arguments.PaddingMode;
            cipher.Mode      = arguments.CipherMode;
            byte[] key = HexToByteArray(arguments.SymmetricPublicKey);
            cipher.Key = key;
            return(cipher);
        }