Leaked source code of windows server 2003
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.

325 lines
5.0 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1999
  3. Module Name:
  4. FrontCrypt
  5. Abstract:
  6. This header file provides a front end to the CryptoAPI V1.0 calls,
  7. simplifying the calling interface by using CBuffer objects for the return
  8. values, and directly returning error codes. It also supplies missing calls
  9. on earlier operating systems.
  10. Author:
  11. Doug Barlow (dbarlow) 8/22/1999
  12. Remarks:
  13. ?Remarks?
  14. Notes:
  15. ?Notes?
  16. --*/
  17. #ifndef _FRONTCRYPT_H_
  18. #define _FRONTCRYPT_H_
  19. #ifdef __cplusplus
  20. LONG
  21. FCryptAcquireContext(
  22. HCRYPTPROV *phProv,
  23. LPCSTR pszContainer,
  24. LPCSTR pszProvider,
  25. DWORD dwProvType,
  26. DWORD dwFlags
  27. );
  28. LONG
  29. FCryptAcquireContext(
  30. HCRYPTPROV *phProv,
  31. LPCWSTR pszContainer,
  32. LPCWSTR pszProvider,
  33. DWORD dwProvType,
  34. DWORD dwFlags
  35. );
  36. LONG
  37. FCryptReleaseContext(
  38. HCRYPTPROV hProv,
  39. DWORD dwFlags
  40. );
  41. LONG
  42. FCryptGenKey(
  43. HCRYPTPROV hProv,
  44. ALG_ID Algid,
  45. DWORD dwFlags,
  46. HCRYPTKEY *phKey
  47. );
  48. LONG
  49. FCryptDeriveKey(
  50. HCRYPTPROV hProv,
  51. ALG_ID Algid,
  52. HCRYPTHASH hBaseData,
  53. DWORD dwFlags,
  54. HCRYPTKEY *phKey
  55. );
  56. LONG
  57. FCryptDestroyKey(
  58. HCRYPTKEY hKey
  59. );
  60. LONG
  61. FCryptSetKeyParam(
  62. HCRYPTKEY hKey,
  63. DWORD dwParam,
  64. LPCBYTE pbData,
  65. DWORD dwFlags
  66. );
  67. LONG
  68. FCryptGetKeyParam(
  69. HCRYPTKEY hKey,
  70. DWORD dwParam,
  71. CBuffer &bfData,
  72. DWORD dwFlags
  73. );
  74. LONG
  75. FCryptSetHashParam(
  76. HCRYPTHASH hHash,
  77. DWORD dwParam,
  78. LPCBYTE pbData,
  79. DWORD dwFlags
  80. );
  81. LONG
  82. FCryptGetHashParam(
  83. HCRYPTHASH hHash,
  84. DWORD dwParam,
  85. CBuffer &bfData,
  86. DWORD dwFlags
  87. );
  88. LONG
  89. FCryptSetProvParam(
  90. HCRYPTPROV hProv,
  91. DWORD dwParam,
  92. LPCBYTE pbData,
  93. DWORD dwFlags
  94. );
  95. LONG
  96. FCryptGetProvParam(
  97. HCRYPTPROV hProv,
  98. DWORD dwParam,
  99. CBuffer &bfData,
  100. DWORD dwFlags
  101. );
  102. LONG
  103. FCryptGenRandom(
  104. HCRYPTPROV hProv,
  105. DWORD dwLen,
  106. CBuffer &bfBuffer
  107. );
  108. LONG
  109. FCryptGetUserKey(
  110. HCRYPTPROV hProv,
  111. DWORD dwKeySpec,
  112. HCRYPTKEY *phUserKey
  113. );
  114. LONG
  115. FCryptExportKey(
  116. HCRYPTKEY hKey,
  117. HCRYPTKEY hExpKey,
  118. DWORD dwBlobType,
  119. DWORD dwFlags,
  120. CBuffer &bfData
  121. );
  122. LONG
  123. FCryptImportKey(
  124. HCRYPTPROV hProv,
  125. LPCBYTE pbData,
  126. DWORD dwDataLen,
  127. HCRYPTKEY hPubKey,
  128. DWORD dwFlags,
  129. HCRYPTKEY *phKey
  130. );
  131. LONG
  132. FCryptEncrypt(
  133. HCRYPTKEY hKey,
  134. HCRYPTHASH hHash,
  135. BOOL Final,
  136. DWORD dwFlags,
  137. CBuffer &bfData
  138. );
  139. LONG
  140. FCryptDecrypt(
  141. HCRYPTKEY hKey,
  142. HCRYPTHASH hHash,
  143. BOOL Final,
  144. DWORD dwFlags,
  145. CBuffer &bfData
  146. );
  147. LONG
  148. FCryptCreateHash(
  149. HCRYPTPROV hProv,
  150. ALG_ID Algid,
  151. HCRYPTKEY hKey,
  152. DWORD dwFlags,
  153. HCRYPTHASH *phHash
  154. );
  155. LONG
  156. FCryptHashData(
  157. HCRYPTHASH hHash,
  158. LPCBYTE pbData,
  159. DWORD dwDataLen,
  160. DWORD dwFlags
  161. );
  162. LONG
  163. FCryptHashSessionKey(
  164. HCRYPTHASH hHash,
  165. HCRYPTKEY hKey,
  166. DWORD dwFlags
  167. );
  168. LONG
  169. FCryptDestroyHash(
  170. HCRYPTHASH hHash
  171. );
  172. LONG
  173. FCryptSignHash(
  174. HCRYPTHASH hHash,
  175. DWORD dwKeySpec,
  176. LPCSTR sDescription,
  177. DWORD dwFlags,
  178. CBuffer &bfSignature
  179. );
  180. LONG
  181. FCryptSignHash(
  182. HCRYPTHASH hHash,
  183. DWORD dwKeySpec,
  184. LPCWSTR sDescription,
  185. DWORD dwFlags,
  186. CBuffer &bfSignature
  187. );
  188. LONG
  189. FCryptVerifySignature(
  190. HCRYPTHASH hHash,
  191. LPCBYTE pbSignature,
  192. DWORD dwSigLen,
  193. HCRYPTKEY hPubKey,
  194. LPCSTR sDescription,
  195. DWORD dwFlags
  196. );
  197. LONG
  198. FCryptVerifySignature(
  199. HCRYPTHASH hHash,
  200. LPCBYTE pbSignature,
  201. DWORD dwSigLen,
  202. HCRYPTKEY hPubKey,
  203. LPCWSTR sDescription,
  204. DWORD dwFlags
  205. );
  206. LONG
  207. FCryptSetProvider(
  208. LPCSTR pszProvName,
  209. DWORD dwProvType
  210. );
  211. LONG
  212. FCryptSetProvider(
  213. LPCWSTR pszProvName,
  214. DWORD dwProvType
  215. );
  216. LONG
  217. FCryptSetProviderEx(
  218. LPCSTR pszProvName,
  219. DWORD dwProvType,
  220. DWORD *pdwReserved,
  221. DWORD dwFlags
  222. );
  223. LONG
  224. FCryptSetProviderEx(
  225. LPCWSTR pszProvName,
  226. DWORD dwProvType,
  227. DWORD * pdwReserved,
  228. DWORD dwFlags
  229. );
  230. LONG
  231. FCryptGetDefaultProvider(
  232. DWORD dwProvType,
  233. DWORD *pdwReserved,
  234. DWORD dwFlags,
  235. CBuffer &bfProvName
  236. );
  237. LONG
  238. FCryptEnumProviderTypes(
  239. DWORD dwIndex,
  240. DWORD * pdwReserved,
  241. DWORD dwFlags,
  242. DWORD * pdwProvType,
  243. CBuffer &bfTypeName
  244. );
  245. LONG
  246. FCryptEnumProviders(
  247. DWORD dwIndex,
  248. DWORD * pdwReserved,
  249. DWORD dwFlags,
  250. DWORD * pdwProvType,
  251. CBuffer &bfProvName
  252. );
  253. LONG
  254. FCryptContextAddRef(
  255. HCRYPTPROV hProv,
  256. DWORD * pdwReserved,
  257. DWORD dwFlags
  258. );
  259. LONG
  260. FCryptDuplicateKey(
  261. HCRYPTKEY hKey,
  262. DWORD * pdwReserved,
  263. DWORD dwFlags,
  264. HCRYPTKEY * phKey
  265. );
  266. LONG
  267. FCryptDuplicateHash(
  268. HCRYPTHASH hHash,
  269. DWORD * pdwReserved,
  270. DWORD dwFlags,
  271. HCRYPTHASH * phHash
  272. );
  273. #endif
  274. #endif // _FRONTCRYPT_H_