Package anlavn.hash

Class BCrypt

java.lang.Object
anlavn.hash.BCrypt

public class BCrypt extends Object
The BCrypt class supports to OpenBSD-style Blowfish password hashing for Java. Bcrypt is a password-hashing function designed by Niels Provos and David Mazières, based on the Blowfish cipher and presented at USENIX in 1999.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static final boolean
    check(String strToCheck, String hashedCode)
    Use this method to check if the original string matches a previously hashed one.
    static final String
    encrypt(String strToEncrypt, String salt)
    Use this method to encrypt the original string.
    static final String
    Use this method to generate a salt for use with the BCrypt.Encrypt() method.
    static final String
    genSalt(int log_rounds)
    Use this method to generate a salt for use with the BCrypt.Encrypt() method.
    static final String
    genSalt(int log_rounds, SecureRandom random)
    Use this method to generate a salt for use with the BCrypt.Encrypt() method.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BCrypt

      public BCrypt()
  • Method Details