Object writeReplace() { return BCryptPassword.createRaw(getAlgorithm(), hash, salt, iterationCount); }
BCryptPasswordImpl(final BCryptPassword bCryptPassword) { this(bCryptPassword.getHash().clone(), bCryptPassword.getSalt().clone(), bCryptPassword.getIterationCount()); }
default IteratedSaltedPasswordAlgorithmSpec getParameterSpec() { return new IteratedSaltedPasswordAlgorithmSpec(getIterationCount(), getSalt()); }
default boolean impliesParameters(AlgorithmParameterSpec parameterSpec) { Assert.checkNotNullParam("parameterSpec", parameterSpec); if (parameterSpec instanceof IteratedSaltedPasswordAlgorithmSpec) { final IteratedSaltedPasswordAlgorithmSpec spec = (IteratedSaltedPasswordAlgorithmSpec) parameterSpec; return getIterationCount() <= spec.getIterationCount() && Arrays.equals(getSalt(), spec.getSalt()); } else if (parameterSpec instanceof SaltedPasswordAlgorithmSpec) { return Arrays.equals(getSalt(), ((SaltedPasswordAlgorithmSpec) parameterSpec).getSalt()); } else if (parameterSpec instanceof IteratedPasswordAlgorithmSpec) { return getIterationCount() <= ((IteratedPasswordAlgorithmSpec) parameterSpec).getIterationCount(); } else { return false; } }
BCryptPasswordImpl(final BCryptPassword bCryptPassword) { this(bCryptPassword.getHash().clone(), bCryptPassword.getSalt().clone(), bCryptPassword.getIterationCount()); }
default IteratedSaltedPasswordAlgorithmSpec getParameterSpec() { return new IteratedSaltedPasswordAlgorithmSpec(getIterationCount(), getSalt()); }
return BCryptPassword.createRaw(BCryptPassword.ALGORITHM_BCRYPT, decodedPassword, decodedSalt, cost); } catch (NoSuchElementException e) { throw log.invalidKeySpecUnexpectedEndOfPasswordStringWithCause(e);
BCryptPasswordImpl(final BCryptPassword bCryptPassword) { this(bCryptPassword.getHash().clone(), bCryptPassword.getSalt().clone(), bCryptPassword.getIterationCount()); }
default IteratedSaltedPasswordAlgorithmSpec getParameterSpec() { return new IteratedSaltedPasswordAlgorithmSpec(getIterationCount(), getSalt()); }
Object writeReplace() { return BCryptPassword.createRaw(getAlgorithm(), hash, salt, iterationCount); }
BCryptPasswordImpl(final BCryptPassword bCryptPassword) { this(bCryptPassword.getHash().clone(), bCryptPassword.getSalt().clone(), bCryptPassword.getIterationCount()); }
default IteratedSaltedPasswordAlgorithmSpec getParameterSpec() { return new IteratedSaltedPasswordAlgorithmSpec(getIterationCount(), getSalt()); }
Object writeReplace() { return BCryptPassword.createRaw(getAlgorithm(), hash, salt, iterationCount); }
default boolean impliesParameters(AlgorithmParameterSpec parameterSpec) { Assert.checkNotNullParam("parameterSpec", parameterSpec); if (parameterSpec instanceof IteratedSaltedPasswordAlgorithmSpec) { final IteratedSaltedPasswordAlgorithmSpec spec = (IteratedSaltedPasswordAlgorithmSpec) parameterSpec; return getIterationCount() <= spec.getIterationCount() && Arrays.equals(getSalt(), spec.getSalt()); } else if (parameterSpec instanceof SaltedPasswordAlgorithmSpec) { return Arrays.equals(getSalt(), ((SaltedPasswordAlgorithmSpec) parameterSpec).getSalt()); } else if (parameterSpec instanceof IteratedPasswordAlgorithmSpec) { return getIterationCount() <= ((IteratedPasswordAlgorithmSpec) parameterSpec).getIterationCount(); } else { return false; } }
Object writeReplace() { return BCryptPassword.createRaw(getAlgorithm(), hash, salt, iterationCount); }
default boolean impliesParameters(AlgorithmParameterSpec parameterSpec) { Assert.checkNotNullParam("parameterSpec", parameterSpec); if (parameterSpec instanceof IteratedSaltedPasswordAlgorithmSpec) { final IteratedSaltedPasswordAlgorithmSpec spec = (IteratedSaltedPasswordAlgorithmSpec) parameterSpec; return getIterationCount() <= spec.getIterationCount() && Arrays.equals(getSalt(), spec.getSalt()); } else if (parameterSpec instanceof SaltedPasswordAlgorithmSpec) { return Arrays.equals(getSalt(), ((SaltedPasswordAlgorithmSpec) parameterSpec).getSalt()); } else if (parameterSpec instanceof IteratedPasswordAlgorithmSpec) { return getIterationCount() <= ((IteratedPasswordAlgorithmSpec) parameterSpec).getIterationCount(); } else { return false; } }
return BCryptPassword.createRaw(BCryptPassword.ALGORITHM_BCRYPT, decodedPassword, decodedSalt, cost); } catch (NoSuchElementException e) { throw log.invalidKeySpecUnexpectedEndOfPasswordStringWithCause(e);
default boolean impliesParameters(AlgorithmParameterSpec parameterSpec) { Assert.checkNotNullParam("parameterSpec", parameterSpec); if (parameterSpec instanceof IteratedSaltedPasswordAlgorithmSpec) { final IteratedSaltedPasswordAlgorithmSpec spec = (IteratedSaltedPasswordAlgorithmSpec) parameterSpec; return getIterationCount() <= spec.getIterationCount() && Arrays.equals(getSalt(), spec.getSalt()); } else if (parameterSpec instanceof SaltedPasswordAlgorithmSpec) { return Arrays.equals(getSalt(), ((SaltedPasswordAlgorithmSpec) parameterSpec).getSalt()); } else if (parameterSpec instanceof IteratedPasswordAlgorithmSpec) { return getIterationCount() <= ((IteratedPasswordAlgorithmSpec) parameterSpec).getIterationCount(); } else { return false; } }
return BCryptPassword.createRaw(BCryptPassword.ALGORITHM_BCRYPT, decodedPassword, decodedSalt, cost); } catch (NoSuchElementException e) { throw log.invalidKeySpecUnexpectedEndOfPasswordStringWithCause(e);
return BCryptPassword.createRaw(BCryptPassword.ALGORITHM_BCRYPT, decodedPassword, decodedSalt, cost); } catch (NoSuchElementException e) { throw log.invalidKeySpecUnexpectedEndOfPasswordStringWithCause(e);