@@ -6,6 +6,7 @@ use colored::*;
66use std;
77use wedpr_l_crypto_zkp_utils:: point_to_bytes;
88use wedpr_s_verifiable_confidential_ledger:: vcl;
9+ use protobuf:: Message ;
910
1011fn main ( ) {
1112 print_highlight2 (
@@ -110,13 +111,13 @@ fn flow_cn() {
110111
111112 print_wide ( " ▶ 是否存在加和关系?尝试证明c1_value + c2_value =? c3_value" ) ;
112113 let sum_proof = vcl:: prove_sum_balance ( & c1_secret, & c2_secret, & c3_secret) ;
113- println ! ( "加和关系的证明数据:\n {:?}" , sum_proof) ;
114+ println ! ( "加和关系的证明数据:\n {:?}" , sum_proof. write_to_bytes ( ) ) ;
114115 pause_cn ( ) ;
115116
116117 print_wide ( " ▶ 是否存在乘积关系?尝试证明c1_value * c2_value =? c3_value" ) ;
117118 let product_proof =
118119 vcl:: prove_product_balance ( & c1_secret, & c2_secret, & c3_secret) ;
119- println ! ( "乘积关系的证明数据:\n {:?}" , product_proof) ;
120+ println ! ( "乘积关系的证明数据:\n {:?}" , product_proof. write_to_bytes ( ) ) ;
120121 pause_cn ( ) ;
121122
122123 print_wide ( " ▶ 是否是非负数?尝试证明c1_value >=? 0" ) ;
@@ -301,7 +302,7 @@ fn flow_en() {
301302 c3_value",
302303 ) ;
303304 let sum_proof = vcl:: prove_sum_balance ( & c1_secret, & c2_secret, & c3_secret) ;
304- println ! ( "Proof data for the sum relationship:\n {:?}" , sum_proof) ;
305+ println ! ( "Proof data for the sum relationship:\n {:?}" , sum_proof. write_to_bytes ( ) ) ;
305306 pause_en ( ) ;
306307
307308 print_wide (
@@ -312,7 +313,7 @@ fn flow_en() {
312313 vcl:: prove_product_balance ( & c1_secret, & c2_secret, & c3_secret) ;
313314 println ! (
314315 "Proof data for the product relationship:\n {:?}" ,
315- product_proof
316+ product_proof. write_to_bytes ( )
316317 ) ;
317318 pause_en ( ) ;
318319
0 commit comments