public static boolean bcryptMatches ( String plain , String storedHash ) { if ( StringUtils . isBlank ( plain ) || StringUtils . isBlank ( storedHash ) ) { return false ; } try { return BCrypt . checkpw ( plain , storedHash ) ; } catch ( Exception e ) { return false ; } }
Checks if a hash matches a string .