package pkcs11

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file p11_pkcs5_pbkdf2_salt_source_type.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
type t =
  | CKZ_SALT_SPECIFIED
[@@deriving eq,ord]

let to_string = function
  | CKZ_SALT_SPECIFIED -> "CKZ_SALT_SPECIFIED"

let of_string = function
  | "CKZ_SALT_SPECIFIED" -> CKZ_SALT_SPECIFIED
  | _ -> invalid_arg "CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE.of_string"

let to_yojson salt_type =
  try
    `String (to_string salt_type)
  with Invalid_argument _ ->
    `Null

let of_yojson = P11_helpers.of_json_string ~typename:"salt source type" of_string