@Test public void testLongHashedPassword() { byte[] pw = Bytes.random(DEFAULT_VERSION.allowedMaxPwLength + 2).array(); byte[] salt = Bytes.random(16).array(); byte[] bcryptHashBytes1 = BCrypt.with(LongPasswordStrategies.hashSha512(DEFAULT_VERSION)).hash(4, salt, pw); byte[] bcryptHashBytes2 = BCrypt.with(LongPasswordStrategies.hashSha512(DEFAULT_VERSION)).hash(4, salt, Bytes.wrap(pw).resize(DEFAULT_VERSION.allowedMaxPwLength + 1, BytesTransformer.ResizeTransformer.Mode.RESIZE_KEEP_FROM_ZERO_INDEX).array()); assertFalse(Bytes.wrap(bcryptHashBytes1).equals(bcryptHashBytes2)); }
public static Hasher with(Version version) { return new Hasher(version, new SecureRandom(), LongPasswordStrategies.strict(version)); }
BCrypt { public static Hasher with(Version version) { return new Hasher(version, new SecureRandom(), LongPasswordStrategies.strict(version)); } }
BCrypt { public static Hasher with(Version version) { return new Hasher(version, new SecureRandom(), LongPasswordStrategies.strict(version)); } private  BCrypt(); }
BCrypt { public static Hasher with(Version version) { return new Hasher(version, new SecureRandom(), LongPasswordStrategies.strict(version)); } 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 with(Version version) { return new Hasher(version, new SecureRandom(), LongPasswordStrategies.strict(version)); } 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; }