Library
Module
Module type
Parameter
Class
Class type
val buffer : _ t -> Bigstring.t
buffer signature
is the underlying buffer of signature
. DO NOT MODIFY.
val read_recoverable :
Context.t ->
Bigstring.t ->
(recoverable t, string) Stdlib.result
read_recoverable_exn ctx buf
reads a recoverable signature in buf
if everything goes well or return an error otherwise.
val read_recoverable_exn : Context.t -> Bigstring.t -> recoverable t
read_recoverable_exn ctx buf
reads a recoverable signature in buf
.
to_bytes ?der ctx signature
writes the serialization of signature
in a freshly allocated Bigstring.t
, which is then returned.
normalize ctx sig
is the normalized lower-S form of Some
normalized_sig
if sig
was not already in this form, or None
otherwise.
val sign :
Context.t ->
sk:Key.secret Key.t ->
Bigstring.t ->
(plain t, string) Stdlib.result
val sign_exn : Context.t -> sk:Key.secret Key.t -> Bigstring.t -> plain t
val sign_recoverable :
Context.t ->
sk:Key.secret Key.t ->
Bigstring.t ->
(recoverable t, string) Stdlib.result
val sign_recoverable_exn :
Context.t ->
sk:Key.secret Key.t ->
Bigstring.t ->
recoverable t
val write_sign :
Context.t ->
Bigstring.t ->
sk:Key.secret Key.t ->
msg:Bigstring.t ->
(int, string) Stdlib.result
write_sign ctx buf ~sk
~msg
writes signs msg
with sk
and writes the signature to buf
at ?pos
. It returns the number of bytes written (64) on success, or ar error message otherwise.
val write_sign_exn :
Context.t ->
Bigstring.t ->
sk:Key.secret Key.t ->
msg:Bigstring.t ->
int
write_sign_exn ctx buf ~sk ~msg
writes signs msg
with sk
and writes the signature to buf
at ?pos
. It returns the number of bytes written (64).
val write_sign_recoverable :
Context.t ->
sk:Key.secret Key.t ->
msg:Bigstring.t ->
Bigstring.t ->
(int, string) Stdlib.result
val write_sign_recoverable_exn :
Context.t ->
sk:Key.secret Key.t ->
msg:Bigstring.t ->
Bigstring.t ->
int
val verify_exn :
Context.t ->
pk:Key.public Key.t ->
msg:Bigstring.t ->
signature:_ t ->
bool
val verify :
Context.t ->
pk:Key.public Key.t ->
msg:Bigstring.t ->
signature:_ t ->
(bool, string) Stdlib.result
val recover_exn :
Context.t ->
signature:recoverable t ->
Bigstring.t ->
Key.public Key.t
val recover :
Context.t ->
signature:recoverable t ->
Bigstring.t ->
(Key.public Key.t, string) Stdlib.result