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

◆ Entry() [2/2]

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

Definition at line 259 of file Interop.cs.

260 {
261 this = default(Entry);
262 HashAlgorithmId = hashAlgorithmId;
263 Flags = flags;
264 Handle = handle;
265 Unsafe.SkipInit(out int hashSizeInBytes);
266 int pcbResult;
267 NTSTATUS nTSTATUS = BCryptGetProperty(handle, "HashDigestLength", &hashSizeInBytes, 4, out pcbResult, 0);
268 if (nTSTATUS != 0)
269 {
270 throw CreateCryptographicException(nTSTATUS);
271 }
272 HashSizeInBytes = hashSizeInBytes;
273 }
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.