File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -35,24 +35,6 @@ fn argon2_verify_test() {
35
35
assert_eq ! ( true , is_valid) ;
36
36
}
37
37
38
- #[ test]
39
- fn argon2_verify_fail_test ( ) {
40
- let password = "PasswordToVerify" ;
41
- let password_cstr = CString :: new ( password) . unwrap ( ) ;
42
- let password_bytes = password_cstr. as_bytes_with_nul ( ) ;
43
- let password_ptr = password_bytes. as_ptr ( ) as * const i8 ;
44
- let hashed_password = argon2_hash ( password_ptr) ;
45
- let hashed_password_ctr = unsafe { CString :: from_raw ( hashed_password) } ;
46
- let hashed_password_bytes = hashed_password_ctr. as_bytes_with_nul ( ) ;
47
- let hashed_password_ptr = hashed_password_bytes. as_ptr ( ) as * const i8 ;
48
- let bad_password = CString :: new ( "NotTheFirstPassword" )
49
- . unwrap ( )
50
- . as_bytes_with_nul ( )
51
- . as_ptr ( ) as * const i8 ;
52
- let is_valid = argon2_verify ( hashed_password_ptr, bad_password) ;
53
- assert_eq ! ( false , is_valid) ;
54
- }
55
-
56
38
#[ no_mangle]
57
39
pub extern "C" fn argon2_verify_threadpool ( hashed_pass : * const c_char , password : * const c_char ) -> bool {
58
40
let hashed_pass_string = unsafe {
You can’t perform that action at this time.
0 commit comments