core.sys.windows.wincrypt

Windows API header module

Translated from MinGW Windows headers

Authors

Stewart Gordon

License

Types 105

aliasALG_ID = UINT
aliasHCRYPTPROV = ULONG_PTR
aliasHCRYPTKEY = ULONG_PTR
aliasHCRYPTHASH = ULONG_PTR
Fields
FARPROC FuncVerifyImage
struct_CRYPTOAPI_BLOB
Fields
DWORD cbData
BYTE * pbData
aliasCRYPT_INTEGER_BLOB = _CRYPTOAPI_BLOB
aliasCRYPT_UINT_BLOB = _CRYPTOAPI_BLOB
aliasCRYPT_OBJID_BLOB = _CRYPTOAPI_BLOB
aliasCERT_NAME_BLOB = _CRYPTOAPI_BLOB
aliasCERT_RDN_VALUE_BLOB = _CRYPTOAPI_BLOB
aliasCERT_BLOB = _CRYPTOAPI_BLOB
aliasCRL_BLOB = _CRYPTOAPI_BLOB
aliasDATA_BLOB = _CRYPTOAPI_BLOB
aliasCRYPT_DATA_BLOB = _CRYPTOAPI_BLOB
aliasCRYPT_HASH_BLOB = _CRYPTOAPI_BLOB
aliasCRYPT_DIGEST_BLOB = _CRYPTOAPI_BLOB
aliasCRYPT_DER_BLOB = _CRYPTOAPI_BLOB
aliasCRYPT_ATTR_BLOB = _CRYPTOAPI_BLOB
aliasPCRYPT_INTEGER_BLOB = _CRYPTOAPI_BLOB *
aliasPCRYPT_UINT_BLOB = _CRYPTOAPI_BLOB *
aliasPCRYPT_OBJID_BLOB = _CRYPTOAPI_BLOB *
aliasPCERT_NAME_BLOB = _CRYPTOAPI_BLOB *
aliasPCERT_RDN_VALUE_BLOB = _CRYPTOAPI_BLOB *
aliasPCERT_BLOB = _CRYPTOAPI_BLOB *
aliasPCRL_BLOB = _CRYPTOAPI_BLOB *
aliasPDATA_BLOB = _CRYPTOAPI_BLOB *
aliasPCRYPT_DATA_BLOB = _CRYPTOAPI_BLOB *
aliasPCRYPT_HASH_BLOB = _CRYPTOAPI_BLOB *
aliasPCRYPT_DIGEST_BLOB = _CRYPTOAPI_BLOB *
aliasPCRYPT_DER_BLOB = _CRYPTOAPI_BLOB *
aliasPCRYPT_ATTR_BLOB = _CRYPTOAPI_BLOB *
Fields
DWORD cbStruct
DWORD dwAuthType
DWORD fdwChecks
LPWSTR pwszServerName
Fields
DWORD cbSize
DWORD dwFlags
void * pvExtraPolicyPara
Fields
DWORD cbSize
DWORD dwError
LONG lChainIndex
LONG lElementIndex
void * pvExtraPolicyStatus
Fields
LPSTR pszObjId
CRYPT_OBJID_BLOB Parameters
Fields
DWORD cbData
BYTE * pbData
DWORD cUnusedBits
Fields
LPSTR pszObjId
BOOL fCritical
structCERT_INFO
Fields
DWORD dwVersion
CRYPT_INTEGER_BLOB SerialNumber
CRYPT_ALGORITHM_IDENTIFIER SignatureAlgorithm
FILETIME NotBefore
FILETIME NotAfter
CERT_PUBLIC_KEY_INFO SubjectPublicKeyInfo
CRYPT_BIT_BLOB IssuerUniqueId
CRYPT_BIT_BLOB SubjectUniqueId
DWORD cExtension
PCERT_EXTENSION rgExtension
Fields
DWORD dwCertEncodingType
BYTE * pbCertEncoded
DWORD cbCertEncoded
PCERT_INFO pCertInfo
HCERTSTORE hCertStore
structCTL_USAGE
Fields
DWORD cUsageIdentifier
LPSTR * rgpszUsageIdentifier
Fields
DWORD cbSize
CERT_USAGE_MATCH RequestedUsage
CERT_USAGE_MATCH RequestedIssuancePolicy
DWORD dwUrlRetrievalTimeout
BOOL fCheckRevocationFreshnessTime
DWORD dwRevocationFreshnessTime
Fields
DWORD cbSize
LPCSTR pszUsageIdentifier
DWORD dwKeySpec
DWORD dwAcquirePrivateKeyFlags
DWORD cIssuer
CERT_NAME_BLOB * rgIssuer
void * pvFindArg
DWORD * pdwIssuerChainIndex
DWORD * pdwIssuerElementIndex
Fields
DWORD dwErrorStatus
DWORD dwInfoStatus
structCRL_ENTRY
Fields
CRYPT_INTEGER_BLOB SerialNumber
FILETIME RevocationDate
DWORD cExtension
PCERT_EXTENSION rgExtension
structCRL_INFO
Fields
DWORD dwVersion
CRYPT_ALGORITHM_IDENTIFIER SignatureAlgorithm
FILETIME ThisUpdate
FILETIME NextUpdate
DWORD cCRLEntry
PCRL_ENTRY rgCRLEntry
DWORD cExtension
PCERT_EXTENSION rgExtension
Fields
DWORD dwCertEncodingType
BYTE * pbCrlEncoded
DWORD cbCrlEncoded
PCRL_INFO pCrlInfo
HCERTSTORE hCertStore
aliasPCCRL_CONTEXT = const(CRL_CONTEXT) *
Fields
DWORD cbSize
PCCRL_CONTEXT pBaseCRLContext
PCCRL_CONTEXT pDeltaCRLContext
PCRL_ENTRY pCrlEntry
BOOL fDeltaCrlEntry
Fields
DWORD cbSize
DWORD dwRevocationResult
LPCSTR pszRevocationOid
LPVOID pvOidSpecificInfo
BOOL fHasFreshnessTime
DWORD dwFreshnessTime
Fields
DWORD cbSize
PCCERT_CONTEXT pCertContext
CERT_TRUST_STATUS TrustStatus
PCERT_REVOCATION_INFO pRevocationInfo
PCERT_ENHKEY_USAGE pIssuanceUsage
PCERT_ENHKEY_USAGE pApplicationUsage
Fields
LPSTR pszObjId
DWORD cValue
structCTL_ENTRY
Fields
CRYPT_DATA_BLOB SubjectIdentifier
DWORD cAttribute
PCRYPT_ATTRIBUTE rgAttribute
structCTL_INFO
Fields
DWORD dwVersion
CTL_USAGE SubjectUsage
CRYPT_DATA_BLOB ListIdentifier
CRYPT_INTEGER_BLOB SequenceNumber
FILETIME ThisUpdate
FILETIME NextUpdate
DWORD cCTLEntry
PCTL_ENTRY rgCTLEntry
DWORD cExtension
PCERT_EXTENSION rgExtension
Fields
DWORD dwMsgAndCertEncodingType
BYTE * pbCtlEncoded
DWORD cbCtlEncoded
PCTL_INFO pCtlInfo
HCERTSTORE hCertStore
HCRYPTMSG hCryptMsg
BYTE * pbCtlContent
DWORD cbCtlContent
aliasPCCTL_CONTEXT = const(CTL_CONTEXT) *
Fields
DWORD cbSize
PCTL_ENTRY pCtlEntry
PCCTL_CONTEXT pCtlContext
Fields
DWORD cbSize
CERT_TRUST_STATUS TrustStatus
DWORD cElement
PCERT_CHAIN_ELEMENT * rgpElement
PCERT_TRUST_LIST_INFO pTrustListInfo
BOOL fHasRevocationFreshnessTime
DWORD dwRevocationFreshnessTime
Fields
DWORD cbSize
CERT_TRUST_STATUS TrustStatus
DWORD cChain
DWORD cLowerQualityChainContext
PCCERT_CHAIN_CONTEXT * rgpLowerQualityChainContext
BOOL fHasRevocationFreshnessTime
DWORD dwRevocationFreshnessTime
Fields
ALG_ID aiAlgid
DWORD dwBitLen
DWORD dwNameLen
CHAR[20] szName
Fields
BYTE bType
BYTE bVersion
WORD reserved
ALG_ID aiKeyAlg
structRSAPUBKEY
Fields
DWORD magic
DWORD bitlen
DWORD pubexp
structHMAC_INFO
Fields
ALG_ID HashAlgid
BYTE * pbInnerString
DWORD cbInnerString
BYTE * pbOuterString
DWORD cbOuterString

Functions 48

fnbool RCRYPT_FAILED()(BOOL r)
fnBOOL CertCloseStore(HCERTSTORE, DWORD) extern(Windows) @nogc nothrow
fnvoid CertFreeCertificateChain(PCCERT_CHAIN_CONTEXT) extern(Windows) @nogc nothrow
fnDWORD CertNameToStrA(DWORD, PCERT_NAME_BLOB, DWORD, LPSTR, DWORD) extern(Windows) @nogc nothrow
fnDWORD CertNameToStrW(DWORD, PCERT_NAME_BLOB, DWORD, LPWSTR, DWORD) extern(Windows) @nogc nothrow
fnHCERTSTORE CertOpenSystemStoreA(HCRYPTPROV, LPCSTR) extern(Windows) @nogc nothrow
fnHCERTSTORE CertOpenSystemStoreW(HCRYPTPROV, LPCWSTR) extern(Windows) @nogc nothrow
fnHCERTSTORE CertOpenStore(LPCSTR, DWORD, HCRYPTPROV, DWORD, const(void) *) extern(Windows) @nogc nothrow
fnPCCERT_CONTEXT CertFindCertificateInStore(HCERTSTORE, DWORD, DWORD, DWORD, const(void) *, PCCERT_CONTEXT) extern(Windows) @nogc nothrow
fnBOOL CertFreeCertificateContext(PCCERT_CONTEXT) extern(Windows) @nogc nothrow
fnPCCERT_CHAIN_CONTEXT CertFindChainInStore(HCERTSTORE, DWORD, DWORD, DWORD, const(void) *, PCCERT_CHAIN_CONTEXT) extern(Windows) @nogc nothrow
fnBOOL CryptAcquireContextA(HCRYPTPROV *, LPCSTR, LPCSTR, DWORD, DWORD) extern(Windows) @nogc nothrow
fnBOOL CryptAcquireContextW(HCRYPTPROV *, LPCWSTR, LPCWSTR, DWORD, DWORD) extern(Windows) @nogc nothrow
fnBOOL CryptContextAddRef(HCRYPTPROV, DWORD *, DWORD) extern(Windows) @nogc nothrow
fnBOOL CryptReleaseContext(HCRYPTPROV, ULONG_PTR) extern(Windows) @nogc nothrow
fnBOOL CryptGenKey(HCRYPTPROV, ALG_ID, DWORD, HCRYPTKEY *) extern(Windows) @nogc nothrow
fnBOOL CryptDeriveKey(HCRYPTPROV, ALG_ID, HCRYPTHASH, DWORD, HCRYPTKEY *) extern(Windows) @nogc nothrow
fnBOOL CryptDestroyKey(HCRYPTKEY) extern(Windows) @nogc nothrow
fnBOOL CryptSetKeyParam(HCRYPTKEY, DWORD, PBYTE, DWORD) extern(Windows) @nogc nothrow
fnBOOL CryptGetKeyParam(HCRYPTKEY, DWORD, PBYTE, PDWORD, DWORD) extern(Windows) @nogc nothrow
fnBOOL CryptSetHashParam(HCRYPTHASH, DWORD, PBYTE, DWORD) extern(Windows) @nogc nothrow
fnBOOL CryptGetHashParam(HCRYPTHASH, DWORD, PBYTE, PDWORD, DWORD) extern(Windows) @nogc nothrow
fnBOOL CryptSetProvParam(HCRYPTPROV, DWORD, PBYTE, DWORD) extern(Windows) @nogc nothrow
fnBOOL CryptGetProvParam(HCRYPTPROV, DWORD, PBYTE, PDWORD, DWORD) extern(Windows) @nogc nothrow
fnBOOL CryptGenRandom(HCRYPTPROV, DWORD, PBYTE) extern(Windows) @nogc nothrow
fnBOOL CryptGetUserKey(HCRYPTPROV, DWORD, HCRYPTKEY *) extern(Windows) @nogc nothrow
fnBOOL CryptExportKey(HCRYPTKEY, HCRYPTKEY, DWORD, DWORD, PBYTE, PDWORD) extern(Windows) @nogc nothrow
fnBOOL CryptImportKey(HCRYPTPROV, PBYTE, DWORD, HCRYPTKEY, DWORD, HCRYPTKEY *) extern(Windows) @nogc nothrow
fnBOOL CryptEncrypt(HCRYPTKEY, HCRYPTHASH, BOOL, DWORD, PBYTE, PDWORD, DWORD) extern(Windows) @nogc nothrow
fnBOOL CryptDecrypt(HCRYPTKEY, HCRYPTHASH, BOOL, DWORD, PBYTE, PDWORD) extern(Windows) @nogc nothrow
fnBOOL CryptCreateHash(HCRYPTPROV, ALG_ID, HCRYPTKEY, DWORD, HCRYPTHASH *) extern(Windows) @nogc nothrow
fnBOOL CryptHashData(HCRYPTHASH, PBYTE, DWORD, DWORD) extern(Windows) @nogc nothrow
fnBOOL CryptHashSessionKey(HCRYPTHASH, HCRYPTKEY, DWORD) extern(Windows) @nogc nothrow
fnBOOL CryptGetHashValue(HCRYPTHASH, DWORD, PBYTE, PDWORD) extern(Windows) @nogc nothrow
fnBOOL CryptDestroyHash(HCRYPTHASH) extern(Windows) @nogc nothrow
fnBOOL CryptSignHashA(HCRYPTHASH, DWORD, LPCSTR, DWORD, PBYTE, PDWORD) extern(Windows) @nogc nothrow
fnBOOL CryptSignHashW(HCRYPTHASH, DWORD, LPCWSTR, DWORD, PBYTE, PDWORD) extern(Windows) @nogc nothrow
fnBOOL CryptVerifySignatureA(HCRYPTHASH, PBYTE, DWORD, HCRYPTKEY, LPCSTR, DWORD) extern(Windows) @nogc nothrow
fnBOOL CryptVerifySignatureW(HCRYPTHASH, PBYTE, DWORD, HCRYPTKEY, LPCWSTR, DWORD) extern(Windows) @nogc nothrow
fnBOOL CryptSetProviderA(LPCSTR, DWORD) extern(Windows) @nogc nothrow
fnBOOL CryptSetProviderW(LPCWSTR, DWORD) extern(Windows) @nogc nothrow

Variables 1

varTCHAR[] MS_DEF_PROV = "Microsoft Base Cryptographic Provider v1.0"