コード例 #1
0
        private static string DecryptWithAes(Message me, User user)
        {
            var key            = EncryptionServices.DecryptWithRsa(me.EncryptedAesKey, user.PrivateKey);
            var iv             = Convert.FromBase64String(me.EncryptedAesIV);
            var decryptWithAes = EncryptionServices.DecryptWithAes(
                Convert.FromBase64String(me.EncryptedContentOfMessage), key, iv);

            return(decryptWithAes.Length == 0 ? string.Empty : decryptWithAes);
        }