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

◆ Extract() [3/3]

static int System.Security.Cryptography.HKDF.Extract ( HashAlgorithmName hashAlgorithmName,
ReadOnlySpan< byte > ikm,
ReadOnlySpan< byte > salt,
Span< byte > prk )
inlinestatic

Definition at line 20 of file HKDF.cs.

21 {
22 int num = HashLength(hashAlgorithmName);
23 if (prk.Length < num)
24 {
26 }
27 if (prk.Length > num)
28 {
29 prk = prk.Slice(0, num);
30 }
31 Extract(hashAlgorithmName, num, ikm, salt, prk);
32 return num;
33 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Cryptography_Prk_TooSmall
Definition SR.cs:170
Definition SR.cs:7
static int HashLength(HashAlgorithmName hashAlgorithmName)
Definition HKDF.cs:183
static byte[] Extract(HashAlgorithmName hashAlgorithmName, byte[] ikm, byte[]? salt=null)
Definition HKDF.cs:8
Span< T > Slice(int start)
Definition Span.cs:271
int Length
Definition Span.cs:70

References System.SR.Cryptography_Prk_TooSmall, System.Security.Cryptography.HKDF.Extract(), System.SR.Format(), System.Security.Cryptography.HKDF.HashLength(), System.Span< T >.Length, and System.Span< T >.Slice().