/** * Create a raw implementation of this password type. No validation of the content is performed, and the password * must be "adopted" in to a {@link PasswordFactory} (via the {@link PasswordFactory#translate(Password)} method) * before it can be validated and used to verify guesses. * * @param algorithm the algorithm name * @param digest the digest * @return the raw password implementation */ static SimpleDigestPassword createRaw(String algorithm, byte[] digest) { Assert.checkNotNullParam("algorithm", algorithm); Assert.checkNotNullParam("digest", digest); return new RawSimpleDigestPassword(algorithm, digest.clone()); } }
public boolean equals(final Object obj) { if (! (obj instanceof RawSimpleDigestPassword)) { return false; } RawSimpleDigestPassword other = (RawSimpleDigestPassword) obj; return getAlgorithm().equals(other.getAlgorithm()) && Arrays.equals(digest, other.digest); } }
public int hashCode() { return multiHashOrdered(Arrays.hashCode(digest), getAlgorithm().hashCode()); }
/** * Create a raw implementation of this password type. No validation of the content is performed, and the password * must be "adopted" in to a {@link PasswordFactory} (via the {@link PasswordFactory#translate(Password)} method) * before it can be validated and used to verify guesses. * * @param algorithm the algorithm name * @param digest the digest * @return the raw password implementation */ static SimpleDigestPassword createRaw(String algorithm, byte[] digest) { Assert.checkNotNullParam("algorithm", algorithm); Assert.checkNotNullParam("digest", digest); return new RawSimpleDigestPassword(algorithm, digest.clone()); } }
public boolean equals(final Object obj) { if (! (obj instanceof RawSimpleDigestPassword)) { return false; } RawSimpleDigestPassword other = (RawSimpleDigestPassword) obj; return getAlgorithm().equals(other.getAlgorithm()) && Arrays.equals(digest, other.digest); } }
/** * Create a raw implementation of this password type. No validation of the content is performed, and the password * must be "adopted" in to a {@link PasswordFactory} (via the {@link PasswordFactory#translate(Password)} method) * before it can be validated and used to verify guesses. * * @param algorithm the algorithm name * @param digest the digest * @return the raw password implementation */ static SimpleDigestPassword createRaw(String algorithm, byte[] digest) { Assert.checkNotNullParam("algorithm", algorithm); Assert.checkNotNullParam("digest", digest); return new RawSimpleDigestPassword(algorithm, digest.clone()); } }
public boolean equals(final Object obj) { if (! (obj instanceof RawSimpleDigestPassword)) { return false; } RawSimpleDigestPassword other = (RawSimpleDigestPassword) obj; return getAlgorithm().equals(other.getAlgorithm()) && Arrays.equals(digest, other.digest); } }
/** * Create a raw implementation of this password type. No validation of the content is performed, and the password * must be "adopted" in to a {@link PasswordFactory} (via the {@link PasswordFactory#translate(Password)} method) * before it can be validated and used to verify guesses. * * @param algorithm the algorithm name * @param digest the digest * @return the raw password implementation */ static SimpleDigestPassword createRaw(String algorithm, byte[] digest) { Assert.checkNotNullParam("algorithm", algorithm); Assert.checkNotNullParam("digest", digest); return new RawSimpleDigestPassword(algorithm, digest.clone()); } }
public boolean equals(final Object obj) { if (! (obj instanceof RawSimpleDigestPassword)) { return false; } RawSimpleDigestPassword other = (RawSimpleDigestPassword) obj; return getAlgorithm().equals(other.getAlgorithm()) && Arrays.equals(digest, other.digest); } }
public int hashCode() { return multiHashOrdered(Arrays.hashCode(digest), getAlgorithm().hashCode()); }
public int hashCode() { return multiHashOrdered(Arrays.hashCode(digest), getAlgorithm().hashCode()); }
public int hashCode() { return multiHashOrdered(Arrays.hashCode(digest), getAlgorithm().hashCode()); }