Пример #1
0
        public byte[] DecryptStream(byte[] photo, string key)
        {
            string temp = Convert.ToBase64String(photo);

            return(Convert.FromBase64String(SecurityUtil.SymmetricDecrypt(temp, key)));
        }
Пример #2
0
        public byte[] EncryptStream(byte[] photo, string key)
        {
            string temp = SecurityUtil.SymmetricEncrypt(Convert.ToBase64String(photo), key);

            return(Convert.FromBase64String(temp));
        }