Tweetnacl: fix indent
This commit is contained in:
parent
0b31ebb455
commit
7ceb401d44
8
vendors/ocaml-tweetnacl/src/tweetnacl.ml
vendored
8
vendors/ocaml-tweetnacl/src/tweetnacl.ml
vendored
@ -326,10 +326,10 @@ module Sign = struct
|
|||||||
begin match seed with
|
begin match seed with
|
||||||
| None -> keypair pk sk
|
| None -> keypair pk sk
|
||||||
| Some buf ->
|
| Some buf ->
|
||||||
if Bigstring.length buf < seedbytes then
|
if Bigstring.length buf < seedbytes then
|
||||||
invalid_arg "Sign.keypair: seed must be at least 32 bytes long" ;
|
invalid_arg "Sign.keypair: seed must be at least 32 bytes long" ;
|
||||||
Bigstring.blit buf 0 sk 0 pkbytes ;
|
Bigstring.blit buf 0 sk 0 pkbytes ;
|
||||||
keypair_seed pk sk
|
keypair_seed pk sk
|
||||||
end ;
|
end ;
|
||||||
Pk pk, Sk sk
|
Pk pk, Sk sk
|
||||||
|
|
||||||
|
4
vendors/ocaml-tweetnacl/test/test.ml
vendored
4
vendors/ocaml-tweetnacl/test/test.ml
vendored
@ -26,7 +26,7 @@ let sign () =
|
|||||||
match Sign.verify ~key:pk signed_msg with
|
match Sign.verify ~key:pk signed_msg with
|
||||||
| None -> assert false
|
| None -> assert false
|
||||||
| Some verified_msg ->
|
| Some verified_msg ->
|
||||||
Alcotest.check bigstring "sign" msg verified_msg
|
Alcotest.check bigstring "sign" msg verified_msg
|
||||||
|
|
||||||
let sign_detached () =
|
let sign_detached () =
|
||||||
let pk, sk = Sign.keypair () in
|
let pk, sk = Sign.keypair () in
|
||||||
@ -42,7 +42,7 @@ let sign_extended () =
|
|||||||
match Sign.verify ~key:pk signed_msg with
|
match Sign.verify ~key:pk signed_msg with
|
||||||
| None -> assert false
|
| None -> assert false
|
||||||
| Some verified_msg ->
|
| Some verified_msg ->
|
||||||
Alcotest.check bigstring "sign_extended" msg verified_msg
|
Alcotest.check bigstring "sign_extended" msg verified_msg
|
||||||
|
|
||||||
let sign_extended_detached () =
|
let sign_extended_detached () =
|
||||||
let pk, sk = Sign.keypair () in
|
let pk, sk = Sign.keypair () in
|
||||||
|
Loading…
Reference in New Issue
Block a user