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

◆ Pbkdf2() [2/6]

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

Definition at line 299 of file Rfc2898DeriveBytes.cs.

300 {
301 if (iterations <= 0)
302 {
303 throw new ArgumentOutOfRangeException("iterations", System.SR.ArgumentOutOfRange_NeedPosNum);
304 }
305 if (outputLength < 0)
306 {
307 throw new ArgumentOutOfRangeException("outputLength", System.SR.ArgumentOutOfRange_NeedNonNegNum);
308 }
309 ValidateHashAlgorithm(hashAlgorithm);
310 byte[] array = new byte[outputLength];
311 Pbkdf2Core(password, salt, array, iterations, hashAlgorithm);
312 return array;
313 }
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().