core.sys.windows.bcrypt

Cryptographic primitives

Translated from MinGW-w64 Windows headers

License

Boost License 1.0

Authors

Aya Partridge

Source: core/sys/windows/_bcrypt.d

Types 70

Fields
ULONG dwMinLength
ULONG dwMaxLength
ULONG dwIncrement
Fields
ULONG cbOID
PUCHAR pbOID
Fields
ULONG dwOIDCount
BCRYPT_OID * pOIDs
Fields
LPCWSTR pszAlgId
Fields
LPCWSTR pszAlgId
ULONG cbSalt
Fields
LPCWSTR pszAlgId
PUCHAR pbLabel
ULONG cbLabel
Fields
ULONG cbSize
ULONG dwInfoVersion
PUCHAR pbNonce
ULONG cbNonce
PUCHAR pbAuthData
ULONG cbAuthData
PUCHAR pbTag
ULONG cbTag
PUCHAR pbMacContext
ULONG cbMacContext
ULONG cbAAD
ULONGLONG cbData
ULONG dwFlags
Fields
ULONG cbBuffer
ULONG BufferType
PVOID pvBuffer
Fields
ULONG ulVersion
ULONG cBuffers
PBCryptBuffer pBuffers
Fields
ULONG Magic
Fields
ULONG Magic
ULONG BitLength
ULONG cbPublicExp
ULONG cbModulus
ULONG cbPrime1
ULONG cbPrime2
Fields
ULONG dwMagic
ULONG cbKey
Fields
ULONG dwMagic
ULONG cbKey
Fields
ULONG cbLength
ULONG dwMagic
ULONG cbKeyLength
Fields
ULONG dwMagic
ULONG cbKey
UCHAR[4] Count
UCHAR[20] Seed
UCHAR[20] q
Fields
ULONG dwMagic
ULONG cbKey
HASHALGORITHM_ENUM hashAlgorithm
DSAFIPSVERSION_ENUM standardVersion
ULONG cbSeedLength
ULONG cbGroupSize
UCHAR[4] Count
Fields
ULONG dwMagic
ULONG dwVersion
ULONG cbKeyData
Fields
ULONG cbLength
ULONG dwMagic
ULONG cbKeyLength
UCHAR[4] Count
UCHAR[20] Seed
UCHAR[20] q
Fields
ULONG cbLength
ULONG dwMagic
ULONG cbKeyLength
HASHALGORITHM_ENUM hashAlgorithm
DSAFIPSVERSION_ENUM standardVersion
ULONG cbSeedLength
ULONG cbGroupSize
UCHAR[4] Count
Fields
ULONG dwEccCurveNames
LPWSTR * pEccCurveNames
Fields
ULONG iHash
PUCHAR pbBuffer
ULONG cbBuffer
Fields
ULONG cbPerObject
ULONG cbPerElement
Fields
LPWSTR pszName
ULONG dwClass
ULONG dwFlags
Fields
LPWSTR pszProviderName
Fields
USHORT MajorVersion
USHORT MinorVersion
Fields
ULONG dwInterface
ULONG dwFlags
ULONG cFunctions
PWSTR * rgpszFunctions
Fields
PWSTR pszImage
ULONG cInterfaces
PCRYPT_INTERFACE_REG * rgpInterfaces
Fields
ULONG cAliases
PWSTR * rgpszAliases
Fields
ULONG cProviders
PWSTR * rgpszProviders
Fields
ULONG dwFlags
ULONG dwReserved
Fields
ULONG dwFlags
ULONG dwReserved
Fields
ULONG cContexts
PWSTR * rgpszContexts
Fields
ULONG cFunctions
PWSTR * rgpszFunctions
Fields
ULONG cProviders
PWSTR * rgpszProviders
Fields
PWSTR pszProperty
ULONG cbValue
PUCHAR pbValue
Fields
PWSTR pszImage
ULONG dwFlags
Fields
ULONG dwInterface
PWSTR pszFunction
PWSTR pszProvider
ULONG cProperties
PCRYPT_PROPERTY_REF * rgpProperties
Fields
ULONG cProviders
PCRYPT_PROVIDER_REF * rgpProviders

Functions 54

fnbool BCRYPT_SUCCESS(NTSTATUS Status) @nogc nothrow pure @safe
fnvoid BCRYPT_INIT_AUTH_MODE_INFO(ref BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO _AUTH_INFO_STRUCT_) @nogc nothrow pure @safe
fnNTSTATUS BCryptOpenAlgorithmProvider(scope BCRYPT_ALG_HANDLE * phAlgorithm, scope LPCWSTR pszAlgId, scope LPCWSTR pszImplementation, ULONG dwFlags)
fnNTSTATUS BCryptEnumAlgorithms(ULONG dwAlgOperations, scope ULONG * pAlgCount, scope BCRYPT_ALGORITHM_IDENTIFIER * * ppAlgList, ULONG dwFlags)
fnNTSTATUS BCryptEnumProviders(scope LPCWSTR pszAlgId, scope ULONG * pImplCount, scope BCRYPT_PROVIDER_NAME * * ppImplList, ULONG dwFlags)
fnNTSTATUS BCryptGetProperty(BCRYPT_HANDLE hObject, scope LPCWSTR pszProperty, scope PUCHAR pbOutput, ULONG cbOutput, scope ULONG * pcbResult, ULONG dwFlags)
fnNTSTATUS BCryptSetProperty(BCRYPT_HANDLE hObject, scope LPCWSTR pszProperty, scope PUCHAR pbInput, ULONG cbInput, ULONG dwFlags)
fnNTSTATUS BCryptGenerateSymmetricKey(BCRYPT_ALG_HANDLE hAlgorithm, scope BCRYPT_KEY_HANDLE * phKey, scope PUCHAR pbKeyObject, ULONG cbKeyObject, scope PUCHAR pbSecret, ULONG cbSecret, ULONG dwFlags)
fnNTSTATUS BCryptGenerateKeyPair(BCRYPT_ALG_HANDLE hAlgorithm, scope BCRYPT_KEY_HANDLE * phKey, ULONG dwLength, ULONG dwFlags)
fnNTSTATUS BCryptEncrypt(BCRYPT_KEY_HANDLE hKey, scope PUCHAR pbInput, ULONG cbInput, scope VOID * pPaddingInfo, scope PUCHAR pbIV, ULONG cbIV, scope PUCHAR pbOutput, ULONG cbOutput, scope ULONG * pcbResult, ULONG dwFlags)
fnNTSTATUS BCryptDecrypt(BCRYPT_KEY_HANDLE hKey, scope PUCHAR pbInput, ULONG cbInput, scope VOID * pPaddingInfo, scope PUCHAR pbIV, ULONG cbIV, scope PUCHAR pbOutput, ULONG cbOutput, scope ULONG * pcbResult, ULONG dwFlags)
fnNTSTATUS BCryptExportKey(BCRYPT_KEY_HANDLE hKey, BCRYPT_KEY_HANDLE hExportKey, scope LPCWSTR pszBlobType, scope PUCHAR pbOutput, ULONG cbOutput, scope ULONG * pcbResult, ULONG dwFlags)
fnNTSTATUS BCryptImportKey(BCRYPT_ALG_HANDLE hAlgorithm, BCRYPT_KEY_HANDLE hImportKey, scope LPCWSTR pszBlobType, scope BCRYPT_KEY_HANDLE * phKey, scope PUCHAR pbKeyObject, ULONG cbKeyObject, scope PUCHAR pbInput, ULONG cbInput, ULONG dwFlags)
fnNTSTATUS BCryptImportKeyPair(BCRYPT_ALG_HANDLE hAlgorithm, BCRYPT_KEY_HANDLE hImportKey, scope LPCWSTR pszBlobType, scope BCRYPT_KEY_HANDLE * phKey, scope PUCHAR pbInput, ULONG cbInput, ULONG dwFlags)
fnNTSTATUS BCryptDuplicateKey(BCRYPT_KEY_HANDLE hKey, scope BCRYPT_KEY_HANDLE * phNewKey, scope PUCHAR pbKeyObject, ULONG cbKeyObject, ULONG dwFlags)
fnNTSTATUS BCryptSignHash(BCRYPT_KEY_HANDLE hKey, scope VOID * pPaddingInfo, scope PUCHAR pbInput, ULONG cbInput, scope PUCHAR pbOutput, ULONG cbOutput, scope ULONG * pcbResult, ULONG dwFlags)
fnNTSTATUS BCryptVerifySignature(BCRYPT_KEY_HANDLE hKey, scope VOID * pPaddingInfo, scope PUCHAR pbHash, ULONG cbHash, scope PUCHAR pbSignature, ULONG cbSignature, ULONG dwFlags)
fnNTSTATUS BCryptSecretAgreement(BCRYPT_KEY_HANDLE hPrivKey, BCRYPT_KEY_HANDLE hPubKey, scope BCRYPT_SECRET_HANDLE * phAgreedSecret, ULONG dwFlags)
fnNTSTATUS BCryptDeriveKey(BCRYPT_SECRET_HANDLE hSharedSecret, LPCWSTR pwszKDF, scope BCryptBufferDesc * pParameterList, scope PUCHAR pbDerivedKey, ULONG cbDerivedKey, scope ULONG * pcbResult, ULONG dwFlags)
fnNTSTATUS BCryptKeyDerivation(BCRYPT_KEY_HANDLE hKey, scope BCryptBufferDesc * pParameterList, scope PUCHAR pbDerivedKey, ULONG cbDerivedKey, scope ULONG * pcbResult, ULONG dwFlags)
fnNTSTATUS BCryptCreateHash(BCRYPT_ALG_HANDLE hAlgorithm, scope BCRYPT_HASH_HANDLE * phHash, scope PUCHAR pbHashObject, ULONG cbHashObject, scope PUCHAR pbSecret, ULONG cbSecret, ULONG dwFlags)
fnNTSTATUS BCryptHashData(BCRYPT_HASH_HANDLE hHash, scope PUCHAR pbInput, ULONG cbInput, ULONG dwFlags)
fnNTSTATUS BCryptFinishHash(BCRYPT_HASH_HANDLE hHash, scope PUCHAR pbOutput, ULONG cbOutput, ULONG dwFlags)
fnNTSTATUS BCryptDuplicateHash(BCRYPT_HASH_HANDLE hHash, scope BCRYPT_HASH_HANDLE * phNewHash, scope PUCHAR pbHashObject, ULONG cbHashObject, ULONG dwFlags)
fnNTSTATUS BCryptGenRandom(BCRYPT_ALG_HANDLE hAlgorithm, scope PUCHAR pbBuffer, ULONG cbBuffer, ULONG dwFlags)
fnNTSTATUS BCryptDeriveKeyCapi(BCRYPT_HASH_HANDLE hHash, BCRYPT_ALG_HANDLE hTargetAlg, scope PUCHAR pbDerivedKey, ULONG cbDerivedKey, ULONG dwFlags)
fnNTSTATUS BCryptDeriveKeyPBKDF2(BCRYPT_ALG_HANDLE hPrf, scope PUCHAR pbPassword, ULONG cbPassword, scope PUCHAR pbSalt, ULONG cbSalt, ULONGLONG cIterations, scope PUCHAR pbDerivedKey, ULONG cbDerivedKey, ULONG dwFlags)
fnNTSTATUS BCryptResolveProviders(scope LPCWSTR pszContext, ULONG dwInterface, scope LPCWSTR pszFunction, scope LPCWSTR pszProvider, ULONG dwMode, ULONG dwFlags, scope ULONG * pcbBuffer, scope PCRYPT_PROVIDER_REFS * ppBuffer)
fnNTSTATUS BCryptQueryProviderRegistration(scope LPCWSTR pszProvider, ULONG dwMode, ULONG dwInterface, scope ULONG * pcbBuffer, scope PCRYPT_PROVIDER_REG * ppBuffer)
fnNTSTATUS BCryptEnumRegisteredProviders(scope ULONG * pcbBuffer, scope PCRYPT_PROVIDERS * ppBuffer)
fnNTSTATUS BCryptCreateContext(ULONG dwTable, scope LPCWSTR pszContext, PCRYPT_CONTEXT_CONFIG pConfig)
fnNTSTATUS BCryptDeleteContext(ULONG dwTable, scope LPCWSTR pszContext)
fnNTSTATUS BCryptEnumContexts(ULONG dwTable, scope ULONG * pcbBuffer, scope PCRYPT_CONTEXTS * ppBuffer)
fnNTSTATUS BCryptConfigureContext(ULONG dwTable, scope LPCWSTR pszContext, PCRYPT_CONTEXT_CONFIG pConfig)
fnNTSTATUS BCryptQueryContextConfiguration(ULONG dwTable, scope LPCWSTR pszContext, scope ULONG * pcbBuffer, scope PCRYPT_CONTEXT_CONFIG * ppBuffer)
fnNTSTATUS BCryptAddContextFunction(ULONG dwTable, scope LPCWSTR pszContext, ULONG dwInterface, scope LPCWSTR pszFunction, ULONG dwPosition)
fnNTSTATUS BCryptRemoveContextFunction(ULONG dwTable, scope LPCWSTR pszContext, ULONG dwInterface, scope LPCWSTR pszFunction)
fnNTSTATUS BCryptEnumContextFunctions(ULONG dwTable, scope LPCWSTR pszContext, ULONG dwInterface, scope ULONG * pcbBuffer, scope PCRYPT_CONTEXT_FUNCTIONS * ppBuffer)
fnNTSTATUS BCryptConfigureContextFunction(ULONG dwTable, scope LPCWSTR pszContext, ULONG dwInterface, scope LPCWSTR pszFunction, PCRYPT_CONTEXT_FUNCTION_CONFIG pConfig)
fnNTSTATUS BCryptQueryContextFunctionConfiguration(ULONG dwTable, scope LPCWSTR pszContext, ULONG dwInterface, scope LPCWSTR pszFunction, scope ULONG * pcbBuffer, scope PCRYPT_CONTEXT_FUNCTION_CONFIG * ppBuffer)
fnNTSTATUS BCryptEnumContextFunctionProviders(ULONG dwTable, scope LPCWSTR pszContext, ULONG dwInterface, scope LPCWSTR pszFunction, scope ULONG * pcbBuffer, scope PCRYPT_CONTEXT_FUNCTION_PROVIDERS * ppBuffer)
fnNTSTATUS BCryptSetContextFunctionProperty(ULONG dwTable, scope LPCWSTR pszContext, ULONG dwInterface, scope LPCWSTR pszFunction, LPCWSTR pszProperty, ULONG cbValue, scope PUCHAR pbValue)
fnNTSTATUS BCryptQueryContextFunctionProperty(ULONG dwTable, scope LPCWSTR pszContext, ULONG dwInterface, scope LPCWSTR pszFunction, LPCWSTR pszProperty, ULONG * pcbValue, scope PUCHAR * ppbValue)
fnNTSTATUS BCryptRegisterConfigChangeNotify(scope HANDLE * phEvent)
deprecated

Variables 12

enumvarBCRYPT_OBJECT_ALIGNMENT = 16
enumvarKDF_USE_SECRET_AS_HMAC_KEY_FLAG = 1
enumvarBCRYPT_AUTHENTICATED_CIPHER_MODE_INFO_VERSION = 1
enumvarBCRYPT_PROV_DISPATCH = 0x00000001
enumvarBCRYPT_BLOCK_PADDING = 0x00000001
enumvarBCRYPTBUFFER_VERSION = 0
enumvarBCRYPT_RSAFULLPRIVATE_BLOB = "RSAFULLPRIVATEBLOB"w
enumvarBCRYPT_RSAFULLPRIVATE_MAGIC = 0x33415352
enumvarTLS_13_PRE_SHARED_KEY = "TLS13PRESHAREDKEY"w
enumvarBCRYPT_NO_KEY_VALIDATION = 0x00000008
enumvarCRYPT_OVERWRITE = 0x00000001
enumvarCRYPT_DEFAULT_CONTEXT = "Default"w