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

◆ ValidateHashAlgorithm()

static void System.Security.Cryptography.Rfc2898DeriveBytes.ValidateHashAlgorithm ( HashAlgorithmName hashAlgorithm)
inlinestaticprivate

Definition at line 396 of file Rfc2898DeriveBytes.cs.

397 {
398 if (string.IsNullOrEmpty(hashAlgorithm.Name))
399 {
401 }
402 string name = hashAlgorithm.Name;
403 if (name != HashAlgorithmName.SHA1.Name && name != HashAlgorithmName.SHA256.Name && name != HashAlgorithmName.SHA384.Name && name != HashAlgorithmName.SHA512.Name)
404 {
405 throw new CryptographicException(System.SR.Format(System.SR.Cryptography_UnknownHashAlgorithm, name));
406 }
407 }
static string Cryptography_UnknownHashAlgorithm
Definition SR.cs:152
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Cryptography_HashAlgorithmNameNullOrEmpty
Definition SR.cs:60
Definition SR.cs:7

References System.SR.Cryptography_HashAlgorithmNameNullOrEmpty, System.SR.Cryptography_UnknownHashAlgorithm, System.SR.Format(), System.Security.Cryptography.HashAlgorithmName.Name, System.Security.Cryptography.HashAlgorithmName.SHA1, System.Security.Cryptography.HashAlgorithmName.SHA256, System.Security.Cryptography.HashAlgorithmName.SHA384, and System.Security.Cryptography.HashAlgorithmName.SHA512.

Referenced by System.Security.Cryptography.Rfc2898DeriveBytes.Pbkdf2(), System.Security.Cryptography.Rfc2898DeriveBytes.Pbkdf2(), System.Security.Cryptography.Rfc2898DeriveBytes.Pbkdf2(), and System.Security.Cryptography.Rfc2898DeriveBytes.Pbkdf2().