package pkcs11

  1. Overview
  2. Docs
type t =
  1. | CKM_SHA_1
  2. | CKM_SHA224
  3. | CKM_SHA256
  4. | CKM_SHA512
  5. | CKM_MD5
  6. | CKM_RSA_PKCS_KEY_PAIR_GEN
  7. | CKM_RSA_X9_31_KEY_PAIR_GEN
  8. | CKM_RSA_PKCS
  9. | CKM_RSA_PKCS_OAEP of P11_rsa_pkcs_oaep_params.t
  10. | CKM_RSA_X_509
  11. | CKM_RSA_PKCS_PSS of P11_rsa_pkcs_pss_params.t
  12. | CKM_SHA1_RSA_PKCS
  13. | CKM_SHA224_RSA_PKCS
  14. | CKM_SHA256_RSA_PKCS
  15. | CKM_SHA384_RSA_PKCS
  16. | CKM_SHA512_RSA_PKCS
  17. | CKM_SHA1_RSA_PKCS_PSS of P11_rsa_pkcs_pss_params.t
  18. | CKM_SHA224_RSA_PKCS_PSS of P11_rsa_pkcs_pss_params.t
  19. | CKM_SHA256_RSA_PKCS_PSS of P11_rsa_pkcs_pss_params.t
  20. | CKM_SHA384_RSA_PKCS_PSS of P11_rsa_pkcs_pss_params.t
  21. | CKM_SHA512_RSA_PKCS_PSS of P11_rsa_pkcs_pss_params.t
  22. | CKM_AES_KEY_GEN
  23. | CKM_AES_ECB
  24. | CKM_AES_CBC of P11_hex_data.t
  25. | CKM_AES_CBC_PAD of P11_hex_data.t
  26. | CKM_AES_MAC
  27. | CKM_AES_MAC_GENERAL of P11_ulong.t
  28. | CKM_AES_ECB_ENCRYPT_DATA of P11_hex_data.t
  29. | CKM_AES_CBC_ENCRYPT_DATA of P11_aes_cbc_encrypt_data_params.t
  30. | CKM_DES_KEY_GEN
  31. | CKM_DES_ECB
  32. | CKM_DES_CBC of P11_hex_data.t
  33. | CKM_DES_CBC_PAD of P11_hex_data.t
  34. | CKM_DES_MAC
  35. | CKM_DES_MAC_GENERAL of P11_ulong.t
  36. | CKM_DES_ECB_ENCRYPT_DATA of P11_hex_data.t
  37. | CKM_DES_CBC_ENCRYPT_DATA of P11_des_cbc_encrypt_data_params.t
  38. | CKM_DES3_KEY_GEN
  39. | CKM_DES3_ECB
  40. | CKM_DES3_CBC of P11_hex_data.t
  41. | CKM_DES3_CBC_PAD of P11_hex_data.t
  42. | CKM_DES3_MAC
  43. | CKM_DES3_MAC_GENERAL of P11_ulong.t
  44. | CKM_DES3_ECB_ENCRYPT_DATA of P11_hex_data.t
  45. | CKM_DES3_CBC_ENCRYPT_DATA of P11_des_cbc_encrypt_data_params.t
  46. | CKM_CONCATENATE_BASE_AND_DATA of P11_hex_data.t
  47. | CKM_CONCATENATE_DATA_AND_BASE of P11_hex_data.t
  48. | CKM_XOR_BASE_AND_DATA of P11_hex_data.t
  49. | CKM_EXTRACT_KEY_FROM_KEY of P11_ulong.t
  50. | CKM_CONCATENATE_BASE_AND_KEY of P11_object_handle.t
  51. | CKM_EC_KEY_PAIR_GEN
  52. | CKM_ECDSA
  53. | CKM_ECDSA_SHA1
  54. | CKM_ECDH1_DERIVE of P11_ecdh1_derive_params.t
  55. | CKM_ECDH1_COFACTOR_DERIVE of P11_ecdh1_derive_params.t
  56. | CKM_ECMQV_DERIVE of P11_ecmqv_derive_params.t
  57. | CKM_PKCS5_PBKD2 of P11_pkcs5_pbkd2_data_params.t
  58. | CKM_DSA_KEY_PAIR_GEN
  59. | CKM_DSA_SHA1
  60. | CKM_DSA_SHA224
  61. | CKM_DSA_SHA256
  62. | CKM_DSA_SHA384
  63. | CKM_DSA_SHA512
  64. | CKM_AES_CTR of P11_aes_ctr_params.t
  65. | CKM_AES_GCM of P11_gcm_params.t
  66. | CKM_CS_UNKNOWN of P11_ulong.t
val equal : t -> t -> Ppx_deriving_runtime.bool
val compare : t -> t -> Ppx_deriving_runtime.int
val pp : Ppx_deriving_runtime.Format.formatter -> t -> Ppx_deriving_runtime.unit
val show : t -> Ppx_deriving_runtime.string
val to_yojson : t -> Yojson.Safe.t
val of_yojson : Yojson.Safe.t -> t Ppx_deriving_yojson_runtime.error_or
val mechanism_type : t -> P11_mechanism_type.t
val to_string : t -> string

to_string is defined as fun x -> Mechanism_type.to_string (mechanism_type x)

type kind =
  1. | Encrypt
  2. | Sign
  3. | SignRecover
  4. | Wrap
  5. | Derive
  6. | Digest
  7. | Generate
  8. | Symmetric
  9. | Asymmetric
  10. | DES
  11. | DES3
  12. | AES
  13. | RSA
  14. | DH
  15. | EC

Kinds are "tags" on mechanisms which describe how they can be used.

val kinds : t -> kind list

kinds mechanism returns the tags for the mechanism mechanism.

val is : kind list -> t -> bool

is kinds t checks that the mechanism t has all the tags in the list kinds.

val key_type : t -> P11_key_type.t option

key_type t returns the type of keys associated to the mechanism t.

OCaml

Innovation. Community. Security.