Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

264 lines
4.2 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. // File: capi.h
  7. //
  8. // Contents:
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 11-04-97 jbanes Created.
  15. //
  16. //----------------------------------------------------------------------------
  17. #define SCH_CAPI_USE_CSP 0
  18. #define SCH_CAPI_STATIC_RSA 1
  19. #define SCH_CAPI_STATIC_DH 2
  20. BOOL
  21. WINAPI
  22. SchCryptAcquireContextA(
  23. HCRYPTPROV *phProv,
  24. LPCSTR pszContainer,
  25. LPCSTR pszProvider,
  26. DWORD dwProvType,
  27. DWORD dwFlags,
  28. DWORD dwSchFlags);
  29. BOOL
  30. WINAPI
  31. SchCryptAcquireContextW(
  32. HCRYPTPROV *phProv,
  33. LPCWSTR pszContainer,
  34. LPCWSTR pszProvider,
  35. DWORD dwProvType,
  36. DWORD dwFlags,
  37. DWORD dwSchFlags);
  38. BOOL
  39. WINAPI
  40. SchCryptCreateHash(
  41. HCRYPTPROV hProv,
  42. ALG_ID Algid,
  43. HCRYPTKEY hKey,
  44. DWORD dwFlags,
  45. HCRYPTHASH *phHash,
  46. DWORD dwSchFlags);
  47. BOOL
  48. WINAPI
  49. SchCryptDecrypt(
  50. HCRYPTKEY hKey,
  51. HCRYPTHASH hHash,
  52. BOOL Final,
  53. DWORD dwFlags,
  54. BYTE *pbData,
  55. DWORD *pdwDataLen,
  56. DWORD dwSchFlags);
  57. BOOL
  58. WINAPI
  59. SchCryptDeriveKey(
  60. HCRYPTPROV hProv,
  61. ALG_ID Algid,
  62. HCRYPTHASH hBaseData,
  63. DWORD dwFlags,
  64. HCRYPTKEY *phKey,
  65. DWORD dwSchFlags);
  66. BOOL
  67. WINAPI
  68. SchCryptDestroyHash(
  69. HCRYPTHASH hHash,
  70. DWORD dwSchFlags);
  71. BOOL
  72. WINAPI
  73. SchCryptDestroyKey(
  74. HCRYPTKEY hKey,
  75. DWORD dwSchFlags);
  76. BOOL
  77. WINAPI
  78. SchCryptDuplicateHash(
  79. HCRYPTHASH hHash,
  80. DWORD *pdwReserved,
  81. DWORD dwFlags,
  82. HCRYPTHASH * phHash,
  83. DWORD dwSchFlags);
  84. BOOL
  85. WINAPI
  86. SchCryptDuplicateKey(
  87. HCRYPTKEY hKey,
  88. DWORD *pdwReserved,
  89. DWORD dwFlags,
  90. HCRYPTKEY * phKey,
  91. DWORD dwSchFlags);
  92. BOOL
  93. WINAPI
  94. SchCryptEncrypt(
  95. HCRYPTKEY hKey,
  96. HCRYPTHASH hHash,
  97. BOOL Final,
  98. DWORD dwFlags,
  99. BYTE *pbData,
  100. DWORD *pdwDataLen,
  101. DWORD dwBufLen,
  102. DWORD dwSchFlags);
  103. BOOL
  104. WINAPI
  105. SchCryptExportKey(
  106. HCRYPTKEY hKey,
  107. HCRYPTKEY hExpKey,
  108. DWORD dwBlobType,
  109. DWORD dwFlags,
  110. BYTE *pbData,
  111. DWORD *pdwDataLen,
  112. DWORD dwSchFlags);
  113. BOOL
  114. WINAPI
  115. SchCryptGenKey(
  116. HCRYPTPROV hProv,
  117. ALG_ID Algid,
  118. DWORD dwFlags,
  119. HCRYPTKEY *phKey,
  120. DWORD dwSchFlags);
  121. BOOL
  122. WINAPI
  123. SchCryptGenRandom(
  124. HCRYPTPROV hProv,
  125. DWORD dwLen,
  126. BYTE *pbBuffer,
  127. DWORD dwSchFlags);
  128. BOOL
  129. WINAPI
  130. SchCryptGetHashParam(
  131. HCRYPTHASH hHash,
  132. DWORD dwParam,
  133. BYTE *pbData,
  134. DWORD *pdwDataLen,
  135. DWORD dwFlags,
  136. DWORD dwSchFlags);
  137. BOOL
  138. WINAPI
  139. SchCryptGetKeyParam(
  140. HCRYPTKEY hKey,
  141. DWORD dwParam,
  142. BYTE *pbData,
  143. DWORD *pdwDataLen,
  144. DWORD dwFlags,
  145. DWORD dwSchFlags);
  146. BOOL
  147. WINAPI
  148. SchCryptGetProvParam(
  149. HCRYPTPROV hProv,
  150. DWORD dwParam,
  151. BYTE *pbData,
  152. DWORD *pdwDataLen,
  153. DWORD dwFlags,
  154. DWORD dwSchFlags);
  155. BOOL
  156. WINAPI
  157. SchCryptGetUserKey(
  158. HCRYPTPROV hProv,
  159. DWORD dwKeySpec,
  160. HCRYPTKEY *phUserKey,
  161. DWORD dwSchFlags);
  162. BOOL
  163. WINAPI
  164. SchCryptHashData(
  165. HCRYPTHASH hHash,
  166. CONST BYTE *pbData,
  167. DWORD dwDataLen,
  168. DWORD dwFlags,
  169. DWORD dwSchFlags);
  170. BOOL
  171. WINAPI
  172. SchCryptHashSessionKey(
  173. HCRYPTHASH hHash,
  174. HCRYPTKEY hKey,
  175. DWORD dwFlags,
  176. DWORD dwSchFlags);
  177. BOOL
  178. WINAPI
  179. SchCryptImportKey(
  180. HCRYPTPROV hProv,
  181. CONST BYTE *pbData,
  182. DWORD dwDataLen,
  183. HCRYPTKEY hPubKey,
  184. DWORD dwFlags,
  185. HCRYPTKEY *phKey,
  186. DWORD dwSchFlags);
  187. BOOL
  188. WINAPI
  189. SchCryptReleaseContext(
  190. HCRYPTPROV hProv,
  191. DWORD dwFlags,
  192. DWORD dwSchFlags);
  193. BOOL
  194. WINAPI
  195. SchCryptSetHashParam(
  196. HCRYPTHASH hHash,
  197. DWORD dwParam,
  198. BYTE *pbData,
  199. DWORD dwFlags,
  200. DWORD dwSchFlags);
  201. BOOL
  202. WINAPI
  203. SchCryptSetKeyParam(
  204. HCRYPTKEY hKey,
  205. DWORD dwParam,
  206. BYTE *pbData,
  207. DWORD dwFlags,
  208. DWORD dwSchFlags);
  209. BOOL
  210. WINAPI
  211. SchCryptSetProvParam(
  212. HCRYPTPROV hProv,
  213. DWORD dwParam,
  214. BYTE *pbData,
  215. DWORD dwFlags,
  216. DWORD dwSchFlags);
  217. BOOL
  218. WINAPI
  219. SchCryptSignHash(
  220. HCRYPTHASH hHash,
  221. DWORD dwKeySpec,
  222. LPCSTR sDescription,
  223. DWORD dwFlags,
  224. BYTE *pbSignature,
  225. DWORD *pdwSigLen,
  226. DWORD dwSchFlags);
  227. BOOL
  228. WINAPI
  229. SchCryptVerifySignature(
  230. HCRYPTHASH hHash,
  231. CONST BYTE *pbSignature,
  232. DWORD dwSigLen,
  233. HCRYPTKEY hPubKey,
  234. LPCSTR sDescription,
  235. DWORD dwFlags,
  236. DWORD dwSchFlags);