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
668
668
}
669
669
}
670
670
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
+
671
690
void run_silentpayments_test_vectors (void ) {
672
691
size_t i ;
673
692
@@ -685,6 +704,7 @@ void run_silentpayments_tests(void) {
685
704
test_label_api ();
686
705
test_recipient_api ();
687
706
run_silentpayments_test_vectors ();
707
+ silentpayments_sha256_tag_test ();
688
708
}
689
709
690
710
#endif
You can’t perform that action at this time.
0 commit comments