可以在 Azure 应用服务中使用 System.Security.Cryptography.Cng.CngKey 吗?

Can you use System.Security.Cryptography.Cng.CngKey in an Azure App Service?

我想在用 C# 编写的 Azure 应用服务中使用 RSA 加密,包括密钥创建和管理。是否可以为此目的使用 System.Security.Cryptography.Cng?我无法让它工作,因为 CngKey.Create 似乎需要管理员权限。 public Azure 上的密钥管理是否有更好的替代方案?

如果 CngKey.Create 中的参数 keyName 为空,将创建一个临时密钥,不需要管理员权限。关键信息可以存储在例如Azure Key Vault。