windows-nt/Source/XPSP1/NT/ds/published/inc/swincryp.w

289 lines
4.5 KiB
OpenEdge ABL
Raw Normal View History

2020-09-26 03:20:57 -05:00
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1992 - 1995.
//
// File: wincrypt.h
//
// Contents: Cryptographic API Prototypes and Definitions
//
//----------------------------------------------------------------------------
#ifndef __SWINCRYP_H__
#define __SWINCRYP_H__
#ifdef __cplusplus
extern "C" {
#endif
BOOL
WINAPI
SCryptAcquireContextA(
HCRYPTPROV *phProv,
LPCSTR pszContainer,
LPCSTR pszProvider,
DWORD dwProvType,
DWORD dwFlags);
BOOL
WINAPI
SCryptAcquireContextW(
HCRYPTPROV *phProv,
LPCWSTR pszContainer,
LPCWSTR pszProvider,
DWORD dwProvType,
DWORD dwFlags);
#ifdef UNICODE
#define SCryptAcquireContext SCryptAcquireContextW
#else
#define SCryptAcquireContext SCryptAcquireContextA
#endif // !UNICODE
BOOL
WINAPI
SCryptReleaseContext(
HCRYPTPROV hProv,
DWORD dwFlags);
BOOL
WINAPI
SCryptGenKey(
HCRYPTPROV hProv,
ALG_ID Algid,
DWORD dwFlags,
HCRYPTKEY *phKey);
BOOL
WINAPI
SCryptDuplicateKey(
HCRYPTKEY hKey,
DWORD *pdwReserved,
DWORD dwFlags,
HCRYPTKEY * phKey);
BOOL
WINAPI
SCryptDeriveKey(
HCRYPTPROV hProv,
ALG_ID Algid,
HCRYPTHASH hBaseData,
DWORD dwFlags,
HCRYPTKEY *phKey);
BOOL
WINAPI
SCryptDestroyKey(
HCRYPTKEY hKey);
BOOL
WINAPI
SCryptSetKeyParam(
HCRYPTKEY hKey,
DWORD dwParam,
BYTE *pbData,
DWORD dwFlags);
BOOL
WINAPI
SCryptGetKeyParam(
HCRYPTKEY hKey,
DWORD dwParam,
BYTE *pbData,
DWORD *pdwDataLen,
DWORD dwFlags);
BOOL
WINAPI
SCryptSetHashParam(
HCRYPTHASH hHash,
DWORD dwParam,
BYTE *pbData,
DWORD dwFlags);
BOOL
WINAPI
SCryptGetHashParam(
HCRYPTHASH hHash,
DWORD dwParam,
BYTE *pbData,
DWORD *pdwDataLen,
DWORD dwFlags);
BOOL
WINAPI
SCryptSetProvParam(
HCRYPTPROV hProv,
DWORD dwParam,
BYTE *pbData,
DWORD dwFlags);
BOOL
WINAPI
SCryptGetProvParam(
HCRYPTPROV hProv,
DWORD dwParam,
BYTE *pbData,
DWORD *pdwDataLen,
DWORD dwFlags);
BOOL
WINAPI
SCryptGenRandom(
HCRYPTPROV hProv,
DWORD dwLen,
BYTE *pbBuffer);
BOOL
WINAPI
SCryptGetUserKey(
HCRYPTPROV hProv,
DWORD dwKeySpec,
HCRYPTKEY *phUserKey);
BOOL
WINAPI
SCryptExportKey(
HCRYPTKEY hKey,
HCRYPTKEY hExpKey,
DWORD dwBlobType,
DWORD dwFlags,
BYTE *pbData,
DWORD *pdwDataLen);
BOOL
WINAPI
SCryptImportKey(
HCRYPTPROV hProv,
CONST BYTE *pbData,
DWORD dwDataLen,
HCRYPTKEY hPubKey,
DWORD dwFlags,
HCRYPTKEY *phKey);
BOOL
WINAPI
SCryptEncrypt(
HCRYPTKEY hKey,
HCRYPTHASH hHash,
BOOL Final,
DWORD dwFlags,
BYTE *pbData,
DWORD *pdwDataLen,
DWORD dwBufLen);
BOOL
WINAPI
SCryptDecrypt(
HCRYPTKEY hKey,
HCRYPTHASH hHash,
BOOL Final,
DWORD dwFlags,
BYTE *pbData,
DWORD *pdwDataLen);
BOOL
WINAPI
SCryptCreateHash(
HCRYPTPROV hProv,
ALG_ID Algid,
HCRYPTKEY hKey,
DWORD dwFlags,
HCRYPTHASH *phHash);
BOOL
WINAPI
SCryptDuplicateHash(
HCRYPTHASH hHash,
DWORD *pdwReserved,
DWORD dwFlags,
HCRYPTHASH * phHash);
BOOL
WINAPI
SCryptHashData(
HCRYPTHASH hHash,
CONST BYTE *pbData,
DWORD dwDataLen,
DWORD dwFlags);
BOOL
WINAPI
SCryptHashSessionKey(
HCRYPTHASH hHash,
HCRYPTKEY hKey,
DWORD dwFlags);
BOOL
WINAPI
SCryptGetHashValue(
HCRYPTHASH hHash,
DWORD dwFlags,
BYTE *pbHash,
DWORD *pdwHashLen);
BOOL
WINAPI
SCryptDestroyHash(
HCRYPTHASH hHash);
BOOL
WINAPI
SCryptSignHashA(
HCRYPTHASH hHash,
DWORD dwKeySpec,
LPCSTR sDescription,
DWORD dwFlags,
BYTE *pbSignature,
DWORD *pdwSigLen);
BOOL
WINAPI
SCryptSignHashW(
HCRYPTHASH hHash,
DWORD dwKeySpec,
LPCWSTR sDescription,
DWORD dwFlags,
BYTE *pbSignature,
DWORD *pdwSigLen);
#ifdef UNICODE
#define SCryptSignHash SCryptSignHashW
#else
#define SCryptSignHash SCryptSignHashA
#endif // !UNICODE
BOOL
WINAPI
SCryptVerifySignatureA(
HCRYPTHASH hHash,
CONST BYTE *pbSignature,
DWORD dwSigLen,
HCRYPTKEY hPubKey,
LPCSTR sDescription,
DWORD dwFlags);
BOOL
WINAPI
SCryptVerifySignatureW(
HCRYPTHASH hHash,
CONST BYTE *pbSignature,
DWORD dwSigLen,
HCRYPTKEY hPubKey,
LPCWSTR sDescription,
DWORD dwFlags);
#ifdef UNICODE
#define SCryptVerifySignature SCryptVerifySignatureW
#else
#define SCryptVerifySignature SCryptVerifySignatureA
#endif // !UNICODE
#ifdef __cplusplus
} // Balance extern "C" above
#endif
#endif // __SWINCRYP_H__