I created a client encryption key using CreateClientEncryptionKeyAsync and didn't specify key veriosn in EncryptionKeyWrapMetadata. Read and Write data is fine. But after I added a new verion of key in keyvault and try to use this method "RewrapClientEncryptionKeyAsync" to change the CMK(azure key vault) in a cosmos db but when the code calls that method I always get the same error:
Azure.RequestFailedException: Error occurred while decoding OAEP padding. Status: 400 (Bad Request) ErrorCode: BadParameter
Content: {"error":{"code":"BadParameter","message":"Error occurred while decoding OAEP padding."}}
How can I resolved this problem?
Should RewrapClientEncryptionKeyAsync be successful when I call CreateClientEncryptionKeyAsync with a veriosn specify key?