Module Psa.Key_usage

Key usages.

Key usages

type t

The type for psa_key_usage_t.

val (+) : t -> t -> t

u0 + u1 combines usages u0 with those of u1.

val (-) : t -> t -> t

u0 - u1 removes usages u1 from those of u0.

val none : t

none has no usage specified.

val export : t
val copy : t
val cache : t
val encrypt : t
val decrypt : t
val sign_message : t
val verify_message : t
val sign_hash : t
val verify_hash : t
val derive : t
val verify_derivation : t

Predicates and comparisons

val test : has:t -> t -> bool

test ~has u is true iff u has at the usages of has.

val equal : t -> t -> bool

equal l0 l1 is true iff l0 and l1 are equal.

val compare : t -> t -> int

compare is a total order compatible with equal.

Converting

val to_uint32 : t -> uint32

to_uint32 l is l as an unsigned 32-bit integer.

val of_uint32 : uint32 -> t

of_uint32 i is a key usage from i.

Formatting

val pp : Stdlib.Format.formatter -> t -> unit

pp formats key usages for inspection.