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

◆ Expand() [1/3]

static byte[] System.Security.Cryptography.HKDF.Expand ( HashAlgorithmName hashAlgorithmName,
byte[] prk,
int outputLength,
byte?[] info = null )
inlinestatic

Definition at line 40 of file HKDF.cs.

41 {
42 if (prk == null)
43 {
44 throw new ArgumentNullException("prk");
45 }
46 if (outputLength <= 0)
47 {
48 throw new ArgumentOutOfRangeException("outputLength", System.SR.ArgumentOutOfRange_NeedPosNum);
49 }
50 int num = HashLength(hashAlgorithmName);
51 int num2 = 255 * num;
52 if (outputLength <= 0 || outputLength > num2)
53 {
54 throw new ArgumentOutOfRangeException("outputLength", System.SR.Format(System.SR.Cryptography_Okm_TooLarge, num2));
55 }
56 byte[] array = new byte[outputLength];
57 Expand(hashAlgorithmName, num, prk, array, info);
58 return array;
59 }
static string ArgumentOutOfRange_NeedPosNum
Definition SR.cs:20
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Cryptography_Okm_TooLarge
Definition SR.cs:172
Definition SR.cs:7
static int HashLength(HashAlgorithmName hashAlgorithmName)
Definition HKDF.cs:183
static byte[] Expand(HashAlgorithmName hashAlgorithmName, byte[] prk, int outputLength, byte[]? info=null)
Definition HKDF.cs:40

References System.SR.ArgumentOutOfRange_NeedPosNum, System.array, System.SR.Cryptography_Okm_TooLarge, System.Security.Cryptography.HKDF.Expand(), System.SR.Format(), System.Security.Cryptography.HKDF.HashLength(), and System.info.

Referenced by System.Security.Cryptography.HKDF.DeriveKey(), System.Security.Cryptography.HKDF.DeriveKey(), System.Security.Cryptography.HKDF.Expand(), and System.Security.Cryptography.HKDF.Expand().