C#生成密钥

提问

C#如何生成密钥

回答

Aes aes = Aes.Create();
        SecurityKey = Convert.ToBase64String(aes.Key);

参考

https://learn.microsoft.com/zh-cn/dotnet/standard/security/generating-keys-for-encryption-and-decryption

posted @ 2023-06-07 16:56  喜爱糖葫芦  阅读(219)  评论(0编辑  收藏  举报