microsoft-graph-docs icon indicating copy to clipboard operation
microsoft-graph-docs copied to clipboard

Invalid C# code for "Decrypt the resource data content"

Open sambetts opened this issue 2 years ago • 4 comments

In the example:

// Obtain the intialization vector from the symmetric key itself.
int vectorSize = 16;
byte[] iv = new byte[vectorSize];
Array.Copy(decryptedSymmetricKey, iv, vectorSize);
aesProvider.IV = iv;

byte[] encryptedPayload = Convert.FromBase64String(<value from _dataKey_ property>);

string decryptedResourceData;

It's the "data" property, not the "dataKey" property. Without this distinction the Decryptor will fail.

Cheers,

Sam


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

sambetts avatar Aug 05 '22 11:08 sambetts