Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Pbkdf2() [4/6]

static byte[] System.Security.Cryptography.Rfc2898DeriveBytes.Pbkdf2 ( ReadOnlySpan< char > password,
ReadOnlySpan< byte > salt,
int iterations,
HashAlgorithmName hashAlgorithm,
int outputLength )
inlinestatic

Definition at line 338 of file Rfc2898DeriveBytes.cs.

339 {
340 if (outputLength < 0)
341 {
342 throw new ArgumentOutOfRangeException("outputLength", System.SR.ArgumentOutOfRange_NeedNonNegNum);
343 }
344 if (iterations <= 0)
345 {
346 throw new ArgumentOutOfRangeException("iterations", System.SR.ArgumentOutOfRange_NeedPosNum);
347 }
348 ValidateHashAlgorithm(hashAlgorithm);
349 byte[] array = new byte[outputLength];
350 Pbkdf2Core(password, salt, array, iterations, hashAlgorithm);
351 return array;
352 }
static string ArgumentOutOfRange_NeedPosNum
Definition SR.cs:20
static string ArgumentOutOfRange_NeedNonNegNum
Definition SR.cs:32
Definition SR.cs:7
static void Pbkdf2Core(ReadOnlySpan< char > password, ReadOnlySpan< byte > salt, Span< byte > destination, int iterations, HashAlgorithmName hashAlgorithm)
static void ValidateHashAlgorithm(HashAlgorithmName hashAlgorithm)

References System.SR.ArgumentOutOfRange_NeedNonNegNum, System.SR.ArgumentOutOfRange_NeedPosNum, System.array, System.Security.Cryptography.Rfc2898DeriveBytes.Pbkdf2Core(), and System.Security.Cryptography.Rfc2898DeriveBytes.ValidateHashAlgorithm().