diff options
author | Артём Павлов [Artyom Pavlov] <newpavlov@gmail.com> | 2017-08-18 01:29:21 +0300 |
---|---|---|
committer | Артём Павлов [Artyom Pavlov] <newpavlov@gmail.com> | 2017-08-18 01:29:21 +0300 |
commit | d4bd00cd5466cf2472c13868104c8c18741cf82d (patch) | |
tree | 62fc518bf9058a960190b3817a43896b7d86bfc4 /srp/tests/mod.rs | |
parent | e40be34281ad7afe1976529a0e4a961153f9b6dc (diff) | |
download | PAKEs-d4bd00cd5466cf2472c13868104c8c18741cf82d.tar.xz |
Clippy updates
Diffstat (limited to 'srp/tests/mod.rs')
-rw-r--r-- | srp/tests/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/srp/tests/mod.rs b/srp/tests/mod.rs index 24d911d..4389f82 100644 --- a/srp/tests/mod.rs +++ b/srp/tests/mod.rs @@ -12,7 +12,7 @@ use srp::server::{SrpServer, UserRecord}; fn auth_test(reg_pwd: &[u8], auth_pwd: &[u8]) { let mut rng = rand::os::OsRng::new().unwrap(); - let username = "alice".as_bytes(); + let username = b"alice"; // Client instance creation let a = rng.gen_iter::<u8>().take(64).collect::<Vec<u8>>(); @@ -34,7 +34,7 @@ fn auth_test(reg_pwd: &[u8], auth_pwd: &[u8]) { let (salt, b_pub) = (&user.salt, server.get_b_pub()); // Client processes handshake reply - let auth_priv_key = srp_private_key::<Sha256>(username, auth_pwd, &salt); + let auth_priv_key = srp_private_key::<Sha256>(username, auth_pwd, salt); let client2 = client.process_reply(&auth_priv_key, &b_pub).unwrap(); let proof = client2.get_proof(); @@ -51,11 +51,11 @@ fn auth_test(reg_pwd: &[u8], auth_pwd: &[u8]) { #[test] fn good_password() { - auth_test("password".as_bytes(), "password".as_bytes()); + auth_test(b"password", b"password"); } #[test] #[should_panic] fn bad_password() { - auth_test("password".as_bytes(), "paSsword".as_bytes()); + auth_test(b"password", b"paSsword"); } |