File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -638,6 +638,10 @@ mod tests {
638
638
use serde:: { Deserialize , Serialize } ;
639
639
use serde_json;
640
640
use x25519_dalek:: { PublicKey , StaticSecret } ;
641
+ #[ cfg( feature = "deterministic_encryption" ) ]
642
+ use alloc:: string:: String ;
643
+ #[ cfg( feature = "deterministic_encryption" ) ]
644
+ use alloc:: format;
641
645
642
646
use crate :: access_control:: AccessControlPolicy ;
643
647
use crate :: conditions:: Context ;
@@ -908,6 +912,16 @@ mod tests {
908
912
test_vectors
909
913
}
910
914
915
+ #[ cfg( feature = "deterministic_encryption" ) ]
916
+ pub fn serialize_test_vector_to_json ( vector : & TestVector ) -> String {
917
+ serde_json:: to_string ( vector) . expect ( "Failed to serialize test vector to JSON" )
918
+ }
919
+
920
+ #[ cfg( feature = "deterministic_encryption" ) ]
921
+ pub fn deserialize_test_vector_from_json ( json : & str ) -> TestVector {
922
+ serde_json:: from_str ( json) . expect ( "Failed to deserialize test vector from JSON" )
923
+ }
924
+
911
925
#[ test]
912
926
#[ cfg( feature = "deterministic_encryption" ) ]
913
927
fn test_encryption_deterministic ( ) {
You can’t perform that action at this time.
0 commit comments