BSDUnixDESCryptPasswordImpl(final SaltedHashPasswordSpec passwordSpec) throws InvalidKeySpecException, InvalidParameterSpecException { this(getSaltValue(passwordSpec.getSalt()), DEFAULT_ITERATION_COUNT, passwordSpec.getHash()); }
UnixDESCryptPasswordImpl(final SaltedHashPasswordSpec spec) throws InvalidKeySpecException, InvalidParameterSpecException, InvalidKeyException { this(spec.getSalt(), spec.getHash().clone()); }
UnixMD5CryptPasswordImpl(final SaltedHashPasswordSpec spec) { this(spec.getHash().clone(), truncatedClone(spec.getSalt())); }
ScramDigestPasswordImpl(final String algorithm, final SaltedHashPasswordSpec spec) { this(algorithm, spec.getHash().clone(), spec.getSalt().clone(), DEFAULT_ITERATION_COUNT); }
BCryptPasswordImpl(final SaltedHashPasswordSpec passwordSpec) { this(passwordSpec.getHash().clone(), passwordSpec.getSalt().clone(), DEFAULT_ITERATION_COUNT); }
SunUnixMD5CryptPasswordImpl(final String algorithm, final SaltedHashPasswordSpec spec) { this(algorithm, spec.getHash().clone(), spec.getSalt().clone(), DEFAULT_ITERATION_COUNT); }
SaltedSimpleDigestPasswordImpl(final String algorithm, final SaltedHashPasswordSpec spec) { this(algorithm, spec.getSalt().clone(), spec.getHash().clone()); }
private static byte[] encodeSaltedHashPasswordSpec(SaltedHashPasswordSpec keySpec) throws InvalidKeySpecException { byte[] salt = keySpec.getSalt(); return new ByteStringBuilder().append(SALTED_HASH_PASSWORD_SPEC_ID) .appendPackedUnsignedBE(salt.length).append(salt).append(keySpec.getHash()).toArray(); }
final SaltedHashPasswordSpec passwordSpec = passwordFactory.getKeySpec(passwordFactory.translate(password), SaltedHashPasswordSpec.class); encoder.startSequence(); encoder.encodeOctetString(passwordSpec.getHash()); encoder.encodeOctetString(passwordSpec.getSalt()); encoder.endSequence();
BSDUnixDESCryptPasswordImpl(final SaltedHashPasswordSpec passwordSpec) throws InvalidKeySpecException, InvalidParameterSpecException { this(getSaltValue(passwordSpec.getSalt()), DEFAULT_ITERATION_COUNT, passwordSpec.getHash()); }
UnixDESCryptPasswordImpl(final SaltedHashPasswordSpec spec) throws InvalidKeySpecException, InvalidParameterSpecException, InvalidKeyException { this(spec.getSalt(), spec.getHash().clone()); }
SunUnixMD5CryptPasswordImpl(final String algorithm, final SaltedHashPasswordSpec spec) { this(algorithm, spec.getHash().clone(), spec.getSalt().clone(), DEFAULT_ITERATION_COUNT); }
BCryptPasswordImpl(final SaltedHashPasswordSpec passwordSpec) { this(passwordSpec.getHash().clone(), passwordSpec.getSalt().clone(), DEFAULT_ITERATION_COUNT); }
BCryptPasswordImpl(final SaltedHashPasswordSpec passwordSpec) { this(passwordSpec.getHash().clone(), passwordSpec.getSalt().clone(), DEFAULT_ITERATION_COUNT); }
SunUnixMD5CryptPasswordImpl(final String algorithm, final SaltedHashPasswordSpec spec) { this(algorithm, spec.getHash().clone(), spec.getSalt().clone(), DEFAULT_ITERATION_COUNT); }
SunUnixMD5CryptPasswordImpl(final String algorithm, final SaltedHashPasswordSpec spec) { this(algorithm, spec.getHash().clone(), spec.getSalt().clone(), DEFAULT_ITERATION_COUNT); }
SaltedSimpleDigestPasswordImpl(final String algorithm, final SaltedHashPasswordSpec spec) { this(algorithm, spec.getSalt().clone(), spec.getHash().clone()); }
private static byte[] encodeSaltedHashPasswordSpec(SaltedHashPasswordSpec keySpec) throws InvalidKeySpecException { byte[] salt = keySpec.getSalt(); return new ByteStringBuilder().append(SALTED_HASH_PASSWORD_SPEC_ID) .appendPackedUnsignedBE(salt.length).append(salt).append(keySpec.getHash()).toArray(); }
private static byte[] encodeSaltedHashPasswordSpec(SaltedHashPasswordSpec keySpec) throws InvalidKeySpecException { byte[] salt = keySpec.getSalt(); return new ByteStringBuilder().append(SALTED_HASH_PASSWORD_SPEC_ID) .appendPackedUnsignedBE(salt.length).append(salt).append(keySpec.getHash()).toArray(); }
private static byte[] encodeSaltedHashPasswordSpec(SaltedHashPasswordSpec keySpec) throws InvalidKeySpecException { byte[] salt = keySpec.getSalt(); return new ByteStringBuilder().append(SALTED_HASH_PASSWORD_SPEC_ID) .appendPackedUnsignedBE(salt.length).append(salt).append(keySpec.getHash()).toArray(); }