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.

219 lines
6.1 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // FILE : cppapi.h //
  3. // DESCRIPTION : Cryptography Provider Private APIs //
  4. // AUTHOR : //
  5. // HISTORY : //
  6. // May 9 1995 larrys New //
  7. // //
  8. // Copyright (C) 1993 Microsoft Corporation All Rights Reserved //
  9. /////////////////////////////////////////////////////////////////////////////
  10. typedef unsigned long HPRIVUID;
  11. #define CPPAPI_FAILED FALSE
  12. #define CPPAPI_SUCCEED TRUE
  13. /*
  14. - CryptLogonVerify
  15. -
  16. * Purpose:
  17. * Used by CryptAcquireContext to verify logon password.
  18. *
  19. *
  20. * Parameters:
  21. * OUT hPrivid - Handle to the id of the user
  22. *
  23. * Returns:
  24. */
  25. BOOL CryptLogonVerify(OUT HPRIVUID *hUID);
  26. /*
  27. - CryptGetUserData
  28. -
  29. * Purpose:
  30. * Get required data from user.
  31. *
  32. *
  33. * Parameters:
  34. * IN hPrivid - Handle to the id of the user
  35. * OUT pbData - bufer containing user-supplied data
  36. * OUT dwBufLen - lenght of user-supplied data
  37. *
  38. * Returns:
  39. */
  40. BOOL CryptGetUserData(IN HPRIVUID hUID,
  41. OUT BYTE **pbData,
  42. OUT DWORD *dwBufLen);
  43. /*
  44. - CryptConfirmSignature
  45. -
  46. * Purpose:
  47. * Determine weather the signing should proceed.
  48. *
  49. *
  50. * Parameters:
  51. * IN pTmpUser - Pointer to the user list structure
  52. * IN dwKeySpec - Type of key to be used for signing
  53. * IN sDescription - Description of document to be signed
  54. *
  55. * Returns:
  56. */
  57. BOOL CryptConfirmSignature(
  58. IN PNTAGUserList pTmpUser,
  59. IN DWORD dwKeySpec,
  60. IN LPCTSTR sDescription
  61. );
  62. /*
  63. - CryptUserProtectKey
  64. -
  65. * Purpose: Obtain or determine user protection information.
  66. *
  67. *
  68. *
  69. * Parameters:
  70. * IN hPrivid - Handle to the id of the user
  71. * IN hKey - Handle to key
  72. *
  73. * Returns:
  74. */
  75. BOOL CryptUserProtectKey(IN HPRIVUID hUID,
  76. IN HCRYPTKEY hKey);
  77. /*
  78. - CryptConfirmEncryption
  79. -
  80. * Purpose:
  81. * Determine weather the encryption should proceed.
  82. *
  83. *
  84. * Parameters:
  85. * IN hPrivid - Handle to the id of the user
  86. * IN hKey - Handle to key
  87. * IN final - flag indicating last encrypt for a
  88. * block of data
  89. *
  90. * Returns:
  91. */
  92. BOOL CryptConfirmEncryption(IN HPRIVUID hUID,
  93. IN HCRYPTKEY hKey,
  94. IN BOOL final);
  95. /*
  96. - CryptConfirmDecryption
  97. -
  98. * Purpose:
  99. * Determine weather the DEcryption should proceed.
  100. *
  101. *
  102. * Parameters:
  103. * IN hPrivid - Handle to the id of the user
  104. * IN hKey - Handle to key
  105. * IN final - flag indicating last encrypt for a
  106. * block of data
  107. *
  108. * Returns:
  109. */
  110. BOOL CryptConfirmDecryption(IN HPRIVUID hUID,
  111. IN HCRYPTKEY hKey,
  112. IN BOOL final);
  113. /*
  114. - CryptConfirmTranslation
  115. -
  116. * Purpose:
  117. * Determine weather the translation should proceed.
  118. *
  119. *
  120. * Parameters:
  121. * IN hPrivid - Handle to the id of the user
  122. * IN hKey - Handle to key
  123. * IN final - flag indicating last encrypt for a
  124. * block of data
  125. *
  126. * Returns:
  127. */
  128. BOOL CryptConfirmTranslation(IN HPRIVUID hUID,
  129. IN HCRYPTKEY hKey,
  130. IN BOOL final);
  131. /*
  132. - CryptConfirmExportKey
  133. -
  134. * Purpose:
  135. * Determine whether the export key should proceed.
  136. *
  137. *
  138. * Parameters:
  139. * IN pTmpUser - Pointer to the user list structure
  140. * IN dwKeySpec - Type of key to be exported
  141. *
  142. * Returns:
  143. */
  144. BOOL CryptConfirmExportKey(
  145. IN PNTAGUserList pTmpUser,
  146. IN DWORD dwKeySpec
  147. );
  148. /*
  149. - CryptConfirmImportKey
  150. -
  151. * Purpose:
  152. * Determine whether the import key should proceed.
  153. *
  154. *
  155. * Parameters:
  156. * IN pTmpUser - Pointer to the user list structure
  157. * IN pKey - Pointer to the key list structure
  158. * IN dwBlobType - Type of blob to be imported
  159. * IN dwKeySpec - Type of key to be imported
  160. *
  161. * Returns:
  162. */
  163. BOOL CryptConfirmImportKey(
  164. IN PNTAGUserList pTmpUser,
  165. IN DWORD dwBlobType,
  166. IN DWORD dwKeySpec
  167. );
  168. /*
  169. - CryptConfirmGenKey
  170. -
  171. * Purpose:
  172. * Determine whether the gen key should proceed.
  173. *
  174. *
  175. * Parameters:
  176. * IN pTmpUser - Pointer to the user list structure
  177. * IN pKey - Pointer to the key list structure
  178. * IN dwKeySpec - Type of key to be imported
  179. *
  180. * Returns:
  181. */
  182. BOOL CryptConfirmGenKey(
  183. IN PNTAGUserList pTmpUser,
  184. IN DWORD dwKeySpec
  185. );
  186. /*
  187. - CryptConfirmChangePassword
  188. -
  189. * Purpose:
  190. * Determine whether the key password should be changed.
  191. *
  192. *
  193. * Parameters:
  194. * IN pTmpUser - Pointer to the user list structure
  195. * IN dwKeySpec - Type of key changing the password for
  196. *
  197. * Returns:
  198. */
  199. BOOL CryptConfirmChangePassword(
  200. IN PNTAGUserList pTmpUser,
  201. IN DWORD dwKeySpec
  202. );