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

◆ HashLength()

static int System.Security.Cryptography.HKDF.HashLength ( HashAlgorithmName hashAlgorithmName)
inlinestaticprivate

Definition at line 183 of file HKDF.cs.

184 {
185 if (hashAlgorithmName == HashAlgorithmName.SHA1)
186 {
187 return 20;
188 }
189 if (hashAlgorithmName == HashAlgorithmName.SHA256)
190 {
191 return 32;
192 }
193 if (hashAlgorithmName == HashAlgorithmName.SHA384)
194 {
195 return 48;
196 }
197 if (hashAlgorithmName == HashAlgorithmName.SHA512)
198 {
199 return 64;
200 }
201 if (hashAlgorithmName == HashAlgorithmName.MD5)
202 {
203 return 16;
204 }
205 throw new ArgumentOutOfRangeException("hashAlgorithmName");
206 }

References System.Security.Cryptography.HashAlgorithmName.MD5, 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.HKDF.DeriveKey(), System.Security.Cryptography.HKDF.DeriveKey(), System.Security.Cryptography.HKDF.Expand(), System.Security.Cryptography.HKDF.Expand(), System.Security.Cryptography.HKDF.Extract(), and System.Security.Cryptography.HKDF.Extract().