File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
deku-p/src/core/crypto/tests Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,12 @@ struct
4545
4646 let to_sign =
4747 List. map (fun string -> Deku_crypto.BLAKE2b. hash string ) to_hash
48+
49+ let signatures =
50+ List. map
51+ (fun sk ->
52+ List. map (fun hash -> (Signature. sign sk hash, hash)) to_sign)
53+ secret_keys
4854 end
4955
5056 module Test_secret_key_data = struct
@@ -125,5 +131,19 @@ struct
125131 Alcotest. (check' string )
126132 ~msg: " presigned hashes are equal" ~expected: Tezos_data. to_sign
127133 ~actual: to_sign
134+
135+ let signatures () =
136+ let signatures =
137+ let out =
138+ List. map
139+ (fun sig_list ->
140+ List. map (fun (sg , _ ) -> helper_string_signatures sg) sig_list)
141+ Signature_data. signatures
142+ in
143+ String. concat " " (List. flatten out)
144+ in
145+ Alcotest. (check' string )
146+ ~msg: " signatures are equal" ~expected: Tezos_data. signatures
147+ ~actual: signatures
128148 end
129149end
Original file line number Diff line number Diff line change @@ -98,5 +98,9 @@ let run () =
9898 test_case " compare" `Quick Test_key_hash_data. compare;
9999 test_case " equality" `Quick Test_key_hash_data. equality;
100100 ] );
101- (" Signatures" , [ test_case " to_sign" `Quick Test_signature_data. to_sign ]);
101+ ( " Signatures" ,
102+ [
103+ test_case " to sign" `Quick Test_signature_data. to_sign;
104+ test_case " signatures" `Quick Test_signature_data. signatures;
105+ ] );
102106 ]
You can’t perform that action at this time.
0 commit comments