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  东百牧码人  阅读(279)  评论(0)    收藏  举报