小编Jon*_*nze的帖子

使用 C# 进行 AES 加密

我是密码学的新手,为了学习它,我尝试使用AESin进行加密/解密C#

\n\n

遗憾的是我意识到,这并不像我想象的那么容易。\n所以我正在寻找一个更简单的解决方案。

\n\n

后来我发现了一些代码片段,其中包括一些解释。

\n\n

我复制了代码并尝试将其实现到一个小应用程序中。

\n\n
using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Security.Cryptography;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace aes\n{\n    class Program\n    {\n\n        public static string passwd = null;\n        public static string content = null;\n        public static string encryptedcontent = null;\n\n        public static byte[] IV = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };\n        public static int BlockSize = 128;\n\n\n        static void Encrypt()\n        {\n\n            if (passwd == …
Run Code Online (Sandbox Code Playgroud)

c# encryption cryptography aes

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

aes ×1

c# ×1

cryptography ×1

encryption ×1