public byte[] DecryptStream(byte[] photo, string key) { string temp = Convert.ToBase64String(photo); return(Convert.FromBase64String(SecurityUtil.SymmetricDecrypt(temp, key))); }
public byte[] EncryptStream(byte[] photo, string key) { string temp = SecurityUtil.SymmetricEncrypt(Convert.ToBase64String(photo), key); return(Convert.FromBase64String(temp)); }