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

◆ Entry() [1/2]

unsafe Interop.BCrypt.BCryptAlgorithmCache.Entry.Entry ( string hashAlgorithmId,
BCryptOpenAlgorithmProviderFlags flags,
SafeBCryptAlgorithmHandle handle )
inline

Definition at line 311 of file Interop.cs.

312 {
313 this = default(Entry);
314 HashAlgorithmId = hashAlgorithmId;
315 Flags = flags;
316 Handle = handle;
317 Unsafe.SkipInit(out int hashSizeInBytes);
318 int pcbResult;
319 NTSTATUS nTSTATUS = BCryptGetProperty(handle, "HashDigestLength", &hashSizeInBytes, 4, out pcbResult, 0);
320 if (nTSTATUS != 0)
321 {
322 throw CreateCryptographicException(nTSTATUS);
323 }
324 HashSizeInBytes = hashSizeInBytes;
325 }
static Exception CreateCryptographicException(NTSTATUS ntStatus)
Definition Interop.cs:461
static unsafe NTSTATUS BCryptGetProperty(SafeBCryptHandle hObject, string pszProperty, void *pbOutput, int cbOutput, out int pcbResult, int dwFlags)
SafeBCryptAlgorithmHandle Handle
Definition Interop.cs:307
unsafe Entry(string hashAlgorithmId, BCryptOpenAlgorithmProviderFlags flags, SafeBCryptAlgorithmHandle handle)
Definition Interop.cs:311

References Interop.BCrypt.BCryptGetProperty(), Interop.BCrypt.CreateCryptographicException(), System.handle, Interop.BCrypt.BCryptAlgorithmCache.Entry.Handle, Interop.BCrypt.BCryptAlgorithmCache.Entry.HashAlgorithmId, and Interop.BCrypt.BCryptAlgorithmCache.Entry.HashSizeInBytes.