aboutsummaryrefslogtreecommitdiff
path: root/spake2/src/tests.rs
diff options
context:
space:
mode:
authorBrian Warner <warner@lothar.com>2018-12-06 11:30:21 -0800
committerBrian Warner <warner@lothar.com>2018-12-06 11:30:21 -0800
commitf826bdbf54d1610383b453f9d5ccfc609455d714 (patch)
tree07de09620c347dd673ba6e4b76bf9a2dc2d6b7fa /spake2/src/tests.rs
parente6f5c622ab6385badb9c45c129c37a742e1b94bb (diff)
downloadPAKEs-f826bdbf54d1610383b453f9d5ccfc609455d714.tar.xz
add group name to SPAKE2 Debug impl
Diffstat (limited to 'spake2/src/tests.rs')
-rw-r--r--spake2/src/tests.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/spake2/src/tests.rs b/spake2/src/tests.rs
index b94bcdd..0328266 100644
--- a/spake2/src/tests.rs
+++ b/spake2/src/tests.rs
@@ -185,9 +185,16 @@ fn test_debug() {
&Identity::new(b"idB"),
);
println!("s1: {:?}", s1);
+ assert_eq!(
+ format!("{:?}", s1),
+ "SPAKE2 { group: \"Ed25519\", side: A, idA: \"(s=idA)\", idB: \"(s=idB)\", idS: \"(s=)\" }"
+ );
+
let (s2, _msg1) = SPAKE2::<Ed25519Group>::start_symmetric(
&Password::new(b"password"),
&Identity::new(b"idS"),
);
println!("s2: {:?}", s2);
+ assert_eq!(format!("{:?}", s2),
+ "SPAKE2 { group: \"Ed25519\", side: Symmetric, idA: \"(s=)\", idB: \"(s=)\", idS: \"(s=idS)\" }");
}