Skip to content
Merged
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 @@ -41,7 +41,13 @@ protected override partial void DeriveRawSecretAgreementCore(X25519DiffieHellman
{
// We intentionally don't special case otherParty being an instance of X25519DiffieHellmanCng and always
// export the public key into the current instance's provider.
Span<byte> publicKeyBuffer = stackalloc byte[PublicKeySizeInBytes * 2];
scoped Span<byte> publicKeyBuffer;

unsafe
{
publicKeyBuffer = stackalloc byte[PublicKeySizeInBytes * 2];
}

Span<byte> publicKeyBytes = publicKeyBuffer.Slice(0, PublicKeySizeInBytes);
Span<byte> reducedPublicKey = publicKeyBuffer.Slice(PublicKeySizeInBytes, PublicKeySizeInBytes);
otherParty.ExportPublicKey(publicKeyBytes);
Expand Down
Loading