Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ohsayan committed Feb 23, 2022
1 parent c5375e3 commit 7c29649
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/basic.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extern crate rcrypt;
use rcrypt::DEFAULT_COST;

#[test]
fn hash_and_verify() {
let mypass = String::from("pass123");
let hash: Vec<u8> = rcrypt::hash(&mypass, DEFAULT_COST).unwrap();
assert!(rcrypt::verify(&mypass, &hash).unwrap());
}

0 comments on commit 7c29649

Please sign in to comment.