如何解决将Azure KeyVault复制到沙盒环境
我们有一个生产型Azure SQL Server数据库,其中包含带有加密列的多个表。加密密钥存储在生产的KeyVault中。我们创建了一个沙箱环境。该数据库已从生产数据库中还原。密钥是使用PowerShell复制的。当我尝试在沙箱中使用我们的应用程序时,尝试解密时出现错误。请参见下面的错误。我们正在尝试做的事情-使用从其他环境复制的密钥解密数据吗?
A .NET Framework error occurred during execution of user-defined routine or aggregate "SLWSDecrypt":
System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed.
System.Security.Cryptography.CryptographicException:
at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer,Int32
inputOffset,Int32 inputCount,Byte[]& outputBuffer,Int32 outputOffset,PaddingMode paddingMode,Boolean fLast)
at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer,Int32 inputOffset,Int32 inputCount)
at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.StreamReader.Dispose(Boolean disposing)
at System.IO.TextReader.Dispose()
at SlwsEncryption.SLWSDecrypt(Byte[] cryptogram,Byte[] key)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。