Class BCrypt

java.lang.Object
com.hierynomus.sshj.userauth.keyprovider.bcrypt.BCrypt

public class BCrypt extends Object
BCrypt implements OpenBSD-style Blowfish password hashing using the scheme described in "A Future-Adaptable Password Scheme" by Niels Provos and David Mazieres.

This password hashing system tries to thwart off-line password cracking using a computationally-intensive hashing algorithm, based on Bruce Schneier's Blowfish cipher. The work factor of the algorithm is parameterised, so it can be increased as computers get faster. The amount of work increases exponentially (2**log_rounds), so each increment is twice as much work. The default log_rounds is 10, and the valid range is 4 to 30.

Version:
0.2
Author:
Damien Miller
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    hash(byte[] hpass, byte[] hsalt, byte[] output)
    Compatibility with new OpenBSD function.
    void
    pbkdf(byte[] password, byte[] salt, int rounds, byte[] output)
    Compatibility with new OpenBSD function.

    Methods inherited from class Object

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

    • BCrypt

      public BCrypt()
  • Method Details

    • hash

      public void hash(byte[] hpass, byte[] hsalt, byte[] output)
      Compatibility with new OpenBSD function.
    • pbkdf

      public void pbkdf(byte[] password, byte[] salt, int rounds, byte[] output)
      Compatibility with new OpenBSD function.