aboutsummaryrefslogtreecommitdiff
path: root/spake2/src/tests.rs
diff options
context:
space:
mode:
authorTony Arcieri <bascule@gmail.com>2022-01-22 15:48:43 -0700
committerGitHub <noreply@github.com>2022-01-22 15:48:43 -0700
commitfb570e02d56b47a812e2a27b6b62eba01ce0416f (patch)
tree5ef5e03a01c7fc26be7d5c5fc5e1672a002181e9 /spake2/src/tests.rs
parent17292b56f52ceab154cb75239f690130df87e8a6 (diff)
downloadPAKEs-fb570e02d56b47a812e2a27b6b62eba01ce0416f.tar.xz
spake2: capitalization and doc fixes (#89)
Renames the following: - `SPAKE2` => `Spake2` - `SPAKEErr` -> `Error` Additionally lints for `missing_docs` and adds preliminary documentation for all types and methods which previously had none.
Diffstat (limited to 'spake2/src/tests.rs')
-rw-r--r--spake2/src/tests.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/spake2/src/tests.rs b/spake2/src/tests.rs
index d063b86..49749db 100644
--- a/spake2/src/tests.rs
+++ b/spake2/src/tests.rs
@@ -61,13 +61,13 @@ fn test_password_to_scalar() {
#[test]
fn test_sizes() {
- let (s1, msg1) = SPAKE2::<Ed25519Group>::start_a(
+ let (s1, msg1) = Spake2::<Ed25519Group>::start_a(
&Password::new(b"password"),
&Identity::new(b"idA"),
&Identity::new(b"idB"),
);
assert_eq!(msg1.len(), 1 + 32);
- let (s2, msg2) = SPAKE2::<Ed25519Group>::start_b(
+ let (s2, msg2) = Spake2::<Ed25519Group>::start_b(
&Password::new(b"password"),
&Identity::new(b"idA"),
&Identity::new(b"idB"),
@@ -78,12 +78,12 @@ fn test_sizes() {
assert_eq!(key1.len(), 32);
assert_eq!(key2.len(), 32);
- let (s1, msg1) = SPAKE2::<Ed25519Group>::start_symmetric(
+ let (s1, msg1) = Spake2::<Ed25519Group>::start_symmetric(
&Password::new(b"password"),
&Identity::new(b"idS"),
);
assert_eq!(msg1.len(), 1 + 32);
- let (s2, msg2) = SPAKE2::<Ed25519Group>::start_symmetric(
+ let (s2, msg2) = Spake2::<Ed25519Group>::start_symmetric(
&Password::new(b"password"),
&Identity::new(b"idS"),
);
@@ -135,7 +135,7 @@ fn test_asymmetric() {
println!("scalar_a is {}", hex::encode(scalar_a.as_bytes()));
- let (s1, msg1) = SPAKE2::<Ed25519Group>::start_a_internal(
+ let (s1, msg1) = Spake2::<Ed25519Group>::start_a_internal(
&Password::new(b"password"),
&Identity::new(b"idA"),
&Identity::new(b"idB"),
@@ -159,7 +159,7 @@ fn test_asymmetric() {
);
assert_eq!(hex::encode(&msg1), expected_msg1);
- let (s2, msg2) = SPAKE2::<Ed25519Group>::start_b_internal(
+ let (s2, msg2) = Spake2::<Ed25519Group>::start_b_internal(
&Password::new(b"password"),
&Identity::new(b"idA"),
&Identity::new(b"idB"),
@@ -182,7 +182,7 @@ fn test_asymmetric() {
#[test]
fn test_debug() {
- let (s1, _msg1) = SPAKE2::<Ed25519Group>::start_a(
+ let (s1, _msg1) = Spake2::<Ed25519Group>::start_a(
&Password::new(b"password"),
&Identity::new(b"idA"),
&Identity::new(b"idB"),
@@ -193,7 +193,7 @@ fn test_debug() {
"SPAKE2 { group: \"Ed25519\", side: A, idA: (s=idA), idB: (s=idB), idS: (s=) }"
);
- let (s2, _msg1) = SPAKE2::<Ed25519Group>::start_symmetric(
+ let (s2, _msg1) = Spake2::<Ed25519Group>::start_symmetric(
&Password::new(b"password"),
&Identity::new(b"idS"),
);