Module Psa.Mac

Message authentication codes (MAC).

See also Message authentication codes (MAC) in Alg.

Single-part functions

val compute : key:Key_id.t -> Alg.t -> input:Bytesrw.Bytes.Slice.t -> mac:Bytesrw.Bytes.Slice.t -> (int, Status.t) Stdlib.result
val verify : key:Key_id.t -> Alg.t -> input:Bytesrw.Bytes.Slice.t -> mac:Bytesrw.Bytes.Slice.t -> Status.t

Multi-part functions

module Operation : sig ... end

MAC operations.

val sign_setup : Operation.t -> Key_id.t -> Alg.t -> Status.t
val verify_setup : Operation.t -> Key_id.t -> Alg.t -> Status.t
val sign_finish : Operation.t -> hash:Bytesrw.Bytes.Slice.t -> (int, Status.t) Stdlib.result
val verify_finish : Operation.t -> hash:Bytesrw.Bytes.Slice.t -> Status.t
val abort : Operation.t -> Status.t

Support functions

val length : Key_type.t -> bits:int -> Alg.t -> int
val max_size : unit -> int