From 22284c589b72fddcd42e3d461200835dc4a6b279 Mon Sep 17 00:00:00 2001 From: Wraith2 Date: Tue, 26 Jan 2021 08:51:15 +0000 Subject: [PATCH] address feedback --- .../src/Microsoft/Data/SqlClient/AlwaysEncryptedKeyConverter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/AlwaysEncryptedKeyConverter.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/AlwaysEncryptedKeyConverter.cs index 9a8d830cdc..6ccbd67fb6 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/AlwaysEncryptedKeyConverter.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/AlwaysEncryptedKeyConverter.cs @@ -39,7 +39,7 @@ internal static RSAParameters RSAPublicKeyBlobToParams(byte[] keyBlob) byte[] exponent = new byte[RSAPublicKeyBlob.ExponentSize]; byte[] modulus = new byte[RSAPublicKeyBlob.ModulusSize]; Buffer.BlockCopy(keyBlob, RSAPublicKeyBlob.ExponentOffset, exponent, 0, RSAPublicKeyBlob.ExponentSize); - Buffer.BlockCopy(keyBlob, RSAPublicKeyBlob.ModulusSize, modulus, 0, RSAPublicKeyBlob.ModulusSize); + Buffer.BlockCopy(keyBlob, RSAPublicKeyBlob.ModulusOffset, modulus, 0, RSAPublicKeyBlob.ModulusSize); return new RSAParameters() {