MCPcopy Index your code
hub / github.com/bcrypt-ruby/bcrypt-ruby / checkpw

Method checkpw

ext/jruby/bcrypt_jruby/BCrypt.java:907–909  ·  view source on GitHub ↗

Check that a plaintext password matches a previously hashed one @param plaintext the plaintext password to verify @param hashed the previously-hashed password @return true if the passwords match, false otherwise

(String plaintext, String hashed)

Source from the content-addressed store, hash-verified

905 * @return true if the passwords match, false otherwise
906 */
907 public static boolean checkpw(String plaintext, String hashed) {
908 return equalsNoEarlyReturn(hashed, hashpw(plaintext, hashed));
909 }
910
911 static boolean equalsNoEarlyReturn(String a, String b) {
912 char[] caa = a.toCharArray();

Callers 3

testCheckpw_successMethod · 0.95
testCheckpw_failureMethod · 0.95

Calls 2

equalsNoEarlyReturnMethod · 0.95
hashpwMethod · 0.95

Tested by 3

testCheckpw_successMethod · 0.76
testCheckpw_failureMethod · 0.76