key-parsers

Parsers for multiple key formats
Library key-parsers
Module Key_parsers . Ltpa . Rsa . Public
type t = {
e : Z.t;
n : Z.t;
}

The format for public keys is:

  • n
  • e

Here again there is an ambiguity, so e is assumed to be 0x010001: this is checked and an error is parsed if that is not the case.

val equal : t -> t -> Ppx_deriving_runtime.bool
val compare : t -> t -> Ppx_deriving_runtime.int
val bin_size_t : t -> int
val bin_read_t : Bin_prot.Common.buf -> pos_ref:Bin_prot.Common.pos_ref -> t
val bin_write_t : Bin_prot.Common.buf -> pos:int -> t -> int
val bin_shape_t : Bin_prot.Shape.t
val bin_reader_t : t Bin_prot.Type_class.reader0
val bin_writer_t : t Bin_prot.Type_class.writer0
val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> ( t, string ) result
val decode : Cstruct.t -> ( t, string ) Result.result