File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/modules/silentpayments Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -668,6 +668,25 @@ void run_silentpayments_test_vector_receive(const struct bip352_test_vector *tes
668668 }
669669}
670670
671+ static void silentpayments_sha256_tag_test (void ) {
672+ secp256k1_sha256 sha ;
673+ {
674+ unsigned char tag [] = "BIP0352/Inputs" ;
675+ secp256k1_silentpayments_sha256_init_inputs (& sha );
676+ sha256_tag_test_internal (& sha , tag , sizeof (tag ) - 1 );
677+ }
678+ {
679+ unsigned char tag [] = "BIP0352/SharedSecret" ;
680+ secp256k1_silentpayments_sha256_init_sharedsecret (& sha );
681+ sha256_tag_test_internal (& sha , tag , sizeof (tag ) - 1 );
682+ }
683+ {
684+ unsigned char tag [] = "BIP0352/Label" ;
685+ secp256k1_silentpayments_sha256_init_label (& sha );
686+ sha256_tag_test_internal (& sha , tag , sizeof (tag ) - 1 );
687+ }
688+ }
689+
671690void run_silentpayments_test_vectors (void ) {
672691 size_t i ;
673692
@@ -685,6 +704,7 @@ void run_silentpayments_tests(void) {
685704 test_label_api ();
686705 test_recipient_api ();
687706 run_silentpayments_test_vectors ();
707+ silentpayments_sha256_tag_test ();
688708}
689709
690710#endif
You can’t perform that action at this time.
0 commit comments