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 @@ -14,7 +14,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Security;
using System.Security.Cryptography;
using System.Text;
Expand Down Expand Up @@ -312,9 +311,10 @@ private Rfc2898DeriveBytes InitializePbkdf2Algorithm()

KeySource.Access(memory =>
{
var iterationSumBytes = memory.Take(Pbkdf2IterationSumLengthInBytes);
var saltBytes = memory.Skip(Pbkdf2IterationSumLengthInBytes).Take(Pbkdf2SaltLengthInBytes);
var passwordBytes = memory.Skip(Pbkdf2IterationSumLengthInBytes + Pbkdf2SaltLengthInBytes).Take(Pbkdf2PasswordLengthInBytes);
var memorySpan = memory.ReadOnlySpan;
var iterationSumBytes = memorySpan.Slice(0, Pbkdf2IterationSumLengthInBytes);
var saltBytes = memorySpan.Slice(Pbkdf2IterationSumLengthInBytes, Pbkdf2SaltLengthInBytes);
var passwordBytes = memorySpan.Slice(Pbkdf2IterationSumLengthInBytes + Pbkdf2SaltLengthInBytes, Pbkdf2PasswordLengthInBytes);
var iterationCount = Pbkdf2MinimumIterationCount;

foreach (var iterationSumValue in iterationSumBytes)
Expand Down