Secp256k1: fix indent

This commit is contained in:
Grégoire Henry 2018-05-03 15:36:02 +02:00
parent 7ceb401d44
commit 387d863f18
2 changed files with 23 additions and 23 deletions

View File

@ -325,9 +325,9 @@ module Sign = struct
let _nb_written = write_exn ~der ctx buf signature in let _nb_written = write_exn ~der ctx buf signature in
buf buf
| R _ as signature -> | R _ as signature ->
let buf = Bigstring.create recoverable_bytes in let buf = Bigstring.create recoverable_bytes in
let _nb_written = write_exn ctx buf signature in let _nb_written = write_exn ctx buf signature in
buf buf
external normalize : external normalize :
Context.t -> Bigstring.t -> Bigstring.t -> bool = Context.t -> Bigstring.t -> Bigstring.t -> bool =
@ -454,5 +454,5 @@ module Sign = struct
let recover ctx ~signature msg = let recover ctx ~signature msg =
try Ok (recover_exn ctx ~signature msg) with try Ok (recover_exn ctx ~signature msg) with
Invalid_argument msg -> Error msg Invalid_argument msg -> Error msg
end end

View File

@ -156,51 +156,51 @@ module Sign : sig
(** {4 Creation} *) (** {4 Creation} *)
val sign : Context.t -> sk:Key.secret Key.t -> Bigstring.t -> (plain val sign : Context.t -> sk:Key.secret Key.t -> Bigstring.t -> (plain
t, string) result t, string) result
val sign_exn : Context.t -> sk:Key.secret Key.t -> Bigstring.t -> val sign_exn : Context.t -> sk:Key.secret Key.t -> Bigstring.t ->
plain t plain t
val sign_recoverable : Context.t -> sk:Key.secret Key.t -> val sign_recoverable : Context.t -> sk:Key.secret Key.t ->
Bigstring.t -> (recoverable t, string) result Bigstring.t -> (recoverable t, string) result
val sign_recoverable_exn : Context.t -> sk:Key.secret Key.t -> val sign_recoverable_exn : Context.t -> sk:Key.secret Key.t ->
Bigstring.t -> recoverable t Bigstring.t -> recoverable t
(** {4 Direct write} *) (** {4 Direct write} *)
val write_sign : Context.t -> Bigstring.t -> sk:Key.secret Key.t -> val write_sign : Context.t -> Bigstring.t -> sk:Key.secret Key.t ->
msg:Bigstring.t -> (int, string) result (** [write_sign ctx buf ~sk msg:Bigstring.t -> (int, string) result (** [write_sign ctx buf ~sk
~msg] writes signs [msg] with [sk] and writes the signature to ~msg] writes signs [msg] with [sk] and writes the signature to
[buf] at [?pos]. It returns the number of bytes written (64) on [buf] at [?pos]. It returns the number of bytes written (64) on
success, or ar error message otherwise. *) success, or ar error message otherwise. *)
val write_sign_exn : Context.t -> Bigstring.t -> sk:Key.secret Key.t val write_sign_exn : Context.t -> Bigstring.t -> sk:Key.secret Key.t
-> msg:Bigstring.t -> int (** [write_sign_exn ctx buf ~sk ~msg] -> msg:Bigstring.t -> int (** [write_sign_exn ctx buf ~sk ~msg]
writes signs [msg] with [sk] and writes the signature to [buf] at writes signs [msg] with [sk] and writes the signature to [buf] at
[?pos]. It returns the number of bytes written (64). [?pos]. It returns the number of bytes written (64).
@raise [Invalid_argument] if [buf] is not long enough to contain @raise [Invalid_argument] if [buf] is not long enough to contain
a signature or signing has failed. *) a signature or signing has failed. *)
val write_sign_recoverable : Context.t -> sk:Key.secret Key.t -> val write_sign_recoverable : Context.t -> sk:Key.secret Key.t ->
msg:Bigstring.t -> Bigstring.t -> (int, string) result msg:Bigstring.t -> Bigstring.t -> (int, string) result
val write_sign_recoverable_exn : Context.t -> sk:Key.secret Key.t -> val write_sign_recoverable_exn : Context.t -> sk:Key.secret Key.t ->
msg:Bigstring.t -> Bigstring.t -> int msg:Bigstring.t -> Bigstring.t -> int
(** {4 Verification} *) (** {4 Verification} *)
val verify_exn : Context.t -> pk:Key.public Key.t -> msg:Bigstring.t val verify_exn : Context.t -> pk:Key.public Key.t -> msg:Bigstring.t
-> signature:_ t -> bool -> signature:_ t -> bool
val verify : Context.t -> pk:Key.public Key.t -> msg:Bigstring.t -> val verify : Context.t -> pk:Key.public Key.t -> msg:Bigstring.t ->
signature:_ t -> (bool, string) result signature:_ t -> (bool, string) result
(** {4 Recovery} *) (** {4 Recovery} *)
val recover_exn : Context.t -> signature:recoverable t -> val recover_exn : Context.t -> signature:recoverable t ->
Bigstring.t -> Key.public Key.t Bigstring.t -> Key.public Key.t
val recover : Context.t -> signature:recoverable t -> Bigstring.t -> val recover : Context.t -> signature:recoverable t -> Bigstring.t ->
(Key.public Key.t, string) result end (Key.public Key.t, string) result end