Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics;
using System.Runtime.InteropServices;

namespace System.Security.Cryptography
{
Expand Down Expand Up @@ -44,7 +45,7 @@ internal unsafe SP800108HmacCounterKdfImplementationCng(ReadOnlySpan<byte> key,

try
{
fixed (byte* pSymmetricKeyMaterial = symmetricKeyMaterial)
fixed (byte* pSymmetricKeyMaterial = &MemoryMarshal.GetReference(symmetricKeyMaterial))
{
_keyHandle = CreateSymmetricKey(pSymmetricKeyMaterial, symmetricKeyMaterialLength);
}
Expand Down Expand Up @@ -88,7 +89,7 @@ internal unsafe SP800108HmacCounterKdfImplementationCng(byte[] key, HashAlgorith

try
{
fixed (byte* pSymmetricKeyMaterial = symmetricKeyMaterial)
fixed (byte* pSymmetricKeyMaterial = &MemoryMarshal.GetReference(symmetricKeyMaterial))
{
_keyHandle = CreateSymmetricKey(pSymmetricKeyMaterial, symmetricKeyMaterialLength);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics;
using System.Runtime.InteropServices;

namespace System.Security.Cryptography
{
Expand Down Expand Up @@ -37,7 +38,7 @@ internal unsafe SP800108HmacCounterKdfImplementationCng(ReadOnlySpan<byte> key,

try
{
fixed (byte* pSymmetricKeyMaterial = symmetricKeyMaterial)
fixed (byte* pSymmetricKeyMaterial = &MemoryMarshal.GetReference(symmetricKeyMaterial))
{
_keyHandle = CreateSymmetricKey(pSymmetricKeyMaterial, symmetricKeyMaterialLength);
}
Expand Down
Loading