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

◆ DeriveKeyMaterialTls() [2/2]

static unsafe byte[] Interop.NCrypt.DeriveKeyMaterialTls ( SafeNCryptSecretHandle secretAgreement,
byte[] label,
byte[] seed,
SecretAgreementFlags flags )
inlinestaticpackage

Definition at line 789 of file Interop.cs.

790 {
791 Span<NCryptBuffer> span = stackalloc NCryptBuffer[2];
792 fixed (byte* value = label)
793 {
794 fixed (byte* value2 = seed)
795 {
796 NCryptBuffer nCryptBuffer = default(NCryptBuffer);
797 nCryptBuffer.cbBuffer = label.Length;
798 nCryptBuffer.BufferType = BufferType.KdfTlsLabel;
799 nCryptBuffer.pvBuffer = new IntPtr(value);
800 span[0] = nCryptBuffer;
801 NCryptBuffer nCryptBuffer2 = default(NCryptBuffer);
802 nCryptBuffer2.cbBuffer = seed.Length;
803 nCryptBuffer2.BufferType = BufferType.KdfTlsSeed;
804 nCryptBuffer2.pvBuffer = new IntPtr(value2);
805 span[1] = nCryptBuffer2;
806 return DeriveKeyMaterial(secretAgreement, "TLS_PRF", span, flags);
807 }
808 }
809 }
static unsafe byte[] DeriveKeyMaterial(SafeNCryptSecretHandle secretAgreement, string kdf, string hashAlgorithm, byte[] hmacKey, byte[] secretPrepend, byte[] secretAppend, SecretAgreementFlags flags)
Definition Interop.cs:617

References Interop.NCrypt.DeriveKeyMaterial(), and System.value.