@Test public void testSimpleBcryptHashes() { byte[] salt = new byte[]{0x5E, (byte) 0xFA, (byte) 0xA7, (byte) 0xA3, (byte) 0xD9, (byte) 0xDF, 0x6E, (byte) 0x7F, (byte) 0x8C, 0x78, (byte) 0x96, (byte) 0xB1, 0x7B, (byte) 0xA7, 0x6E, 0x01}; BCrypt.Hasher bCrypt = BCrypt.withDefaults(); for (int i = 4; i < 10; i++) { byte[] hash = bCrypt.hash(i, salt, "abcdefghijkl1234567öäü-,:".getBytes()); assertEquals(60, hash.length); System.out.println(Bytes.wrap(hash).encodeUtf8()); } }
public static Hasher withDefaults() { return new Hasher(Version.VERSION_2A, new SecureRandom(), LongPasswordStrategies.strict(Version.VERSION_2A)); }
BCrypt { public static Hasher withDefaults() { return new Hasher(Version.VERSION_2A, new SecureRandom(), LongPasswordStrategies.strict(Version.VERSION_2A)); } }
BCrypt { public static Hasher withDefaults() { return new Hasher(Version.VERSION_2A, new SecureRandom(), LongPasswordStrategies.strict(Version.VERSION_2A)); } private  BCrypt(); }
BCrypt { public static Hasher withDefaults() { return new Hasher(Version.VERSION_2A, new SecureRandom(), LongPasswordStrategies.strict(Version.VERSION_2A)); } private  BCrypt(); static Hasher withDefaults(); static Hasher with(Version version); static Hasher with(SecureRandom secureRandom); static Hasher with(LongPasswordStrategy longPasswordStrategy); static Hasher with(Version version, LongPasswordStrategy longPasswordStrategy); static Hasher with(Version version, SecureRandom secureRandom, LongPasswordStrategy longPasswordStrategy); static Verifyer verifyer(); static Verifyer verifyer(Version version); static Verifyer verifyer(Version version, LongPasswordStrategy longPasswordStrategy); }
BCrypt { public static Hasher withDefaults() { return new Hasher(Version.VERSION_2A, new SecureRandom(), LongPasswordStrategies.strict(Version.VERSION_2A)); } private  BCrypt(); static Hasher withDefaults(); static Hasher with(Version version); static Hasher with(SecureRandom secureRandom); static Hasher with(LongPasswordStrategy longPasswordStrategy); static Hasher with(Version version, LongPasswordStrategy longPasswordStrategy); static Hasher with(Version version, SecureRandom secureRandom, LongPasswordStrategy longPasswordStrategy); static Verifyer verifyer(); static Verifyer verifyer(Version version); static Verifyer verifyer(Version version, LongPasswordStrategy longPasswordStrategy); static final int SALT_LENGTH; static final int MIN_COST; static final int MAX_COST; }