Object writeReplace() { return SimpleDigestPassword.createRaw(algorithm, digest); }
SimpleDigestPasswordImpl(final SimpleDigestPassword password) { this(password.getAlgorithm(), password.getDigest().clone()); }
if (ALGORITHM_SIMPLE_DIGEST_MD5.equals(algorithm)) { out.write(new byte[] { '{', 'm', 'd', '5', '}' }); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_SIMPLE_DIGEST_SHA_1.equals(algorithm)) { out.write(new byte[]{'{','s','h','a','}'}); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_SIMPLE_DIGEST_SHA_256.equals(algorithm)) { out.write(new byte[]{'{','s','h','a','2','5','6','}'}); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_SIMPLE_DIGEST_SHA_384.equals(algorithm)) { out.write(new byte[]{'{','s','h','a','3','8','4','}'}); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_SIMPLE_DIGEST_SHA_512.equals(algorithm)) { out.write(new byte[]{'{','s','h','a','5','1','2','}'}); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_PASSWORD_SALT_DIGEST_MD5.equals(algorithm)) { out.write(new byte[]{'{','s','m','d','5','}'});
if (ALGORITHM_SIMPLE_DIGEST_MD5.equals(algorithm)) { out.write(new byte[] { '{', 'm', 'd', '5', '}' }); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_SIMPLE_DIGEST_SHA_1.equals(algorithm)) { out.write(new byte[]{'{','s','h','a','}'}); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_SIMPLE_DIGEST_SHA_256.equals(algorithm)) { out.write(new byte[]{'{','s','h','a','2','5','6','}'}); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_SIMPLE_DIGEST_SHA_384.equals(algorithm)) { out.write(new byte[]{'{','s','h','a','3','8','4','}'}); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_SIMPLE_DIGEST_SHA_512.equals(algorithm)) { out.write(new byte[]{'{','s','h','a','5','1','2','}'}); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_PASSWORD_SALT_DIGEST_MD5.equals(algorithm)) { out.write(new byte[]{'{','s','m','d','5','}'});
SimpleDigestPasswordImpl(final SimpleDigestPassword password) { this(password.getAlgorithm(), password.getDigest().clone()); }
private static Password createSimpleDigestPassword(String algorithm, int prefixSize, byte[] userPassword) throws InvalidKeySpecException { int length = userPassword.length - prefixSize; byte[] digest = CodePointIterator.ofUtf8Bytes(userPassword, prefixSize, length).base64Decode().drain(); return SimpleDigestPassword.createRaw(algorithm, digest); }
if (ALGORITHM_SIMPLE_DIGEST_MD5.equals(algorithm)) { out.write(new byte[] { '{', 'm', 'd', '5', '}' }); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_SIMPLE_DIGEST_SHA_1.equals(algorithm)) { out.write(new byte[]{'{','s','h','a','}'}); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_SIMPLE_DIGEST_SHA_256.equals(algorithm)) { out.write(new byte[]{'{','s','h','a','2','5','6','}'}); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_SIMPLE_DIGEST_SHA_384.equals(algorithm)) { out.write(new byte[]{'{','s','h','a','3','8','4','}'}); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_SIMPLE_DIGEST_SHA_512.equals(algorithm)) { out.write(new byte[]{'{','s','h','a','5','1','2','}'}); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_PASSWORD_SALT_DIGEST_MD5.equals(algorithm)) { out.write(new byte[]{'{','s','m','d','5','}'});
SimpleDigestPasswordImpl(final SimpleDigestPassword password) { this(password.getAlgorithm(), password.getDigest().clone()); }
Object writeReplace() { return SimpleDigestPassword.createRaw(algorithm, digest); }
if (ALGORITHM_SIMPLE_DIGEST_MD5.equals(algorithm)) { out.write(new byte[] { '{', 'm', 'd', '5', '}' }); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_SIMPLE_DIGEST_SHA_1.equals(algorithm)) { out.write(new byte[]{'{','s','h','a','}'}); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_SIMPLE_DIGEST_SHA_256.equals(algorithm)) { out.write(new byte[]{'{','s','h','a','2','5','6','}'}); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_SIMPLE_DIGEST_SHA_384.equals(algorithm)) { out.write(new byte[]{'{','s','h','a','3','8','4','}'}); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_SIMPLE_DIGEST_SHA_512.equals(algorithm)) { out.write(new byte[]{'{','s','h','a','5','1','2','}'}); out.write(ByteIterator.ofBytes(((SimpleDigestPassword)password).getDigest()).base64Encode().asUtf8().drain()); } else if (ALGORITHM_PASSWORD_SALT_DIGEST_MD5.equals(algorithm)) { out.write(new byte[]{'{','s','m','d','5','}'});
SimpleDigestPasswordImpl(final SimpleDigestPassword password) { this(password.getAlgorithm(), password.getDigest().clone()); }
Object writeReplace() { return SimpleDigestPassword.createRaw(algorithm, digest); }
Object writeReplace() { return SimpleDigestPassword.createRaw(algorithm, digest); }
private static Password createSimpleDigestPassword(String algorithm, int prefixSize, byte[] userPassword) throws InvalidKeySpecException { int length = userPassword.length - prefixSize; byte[] digest = CodePointIterator.ofUtf8Bytes(userPassword, prefixSize, length).base64Decode().drain(); return SimpleDigestPassword.createRaw(algorithm, digest); }
private static Password createSimpleDigestPassword(String algorithm, int prefixSize, byte[] userPassword) throws InvalidKeySpecException { int length = userPassword.length - prefixSize; byte[] digest = CodePointIterator.ofUtf8Bytes(userPassword, prefixSize, length).base64Decode().drain(); return SimpleDigestPassword.createRaw(algorithm, digest); }
private static Password createSimpleDigestPassword(String algorithm, int prefixSize, byte[] userPassword) throws InvalidKeySpecException { int length = userPassword.length - prefixSize; byte[] digest = CodePointIterator.ofUtf8Bytes(userPassword, prefixSize, length).base64Decode().drain(); return SimpleDigestPassword.createRaw(algorithm, digest); }