/** * 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 username the user name * @param realm the realm * @param digest the digest * @return the raw password implementation */ static DigestPassword createRaw(String algorithm, String username, String realm, byte[] digest) { Assert.checkNotNullParam("algorithm", algorithm); Assert.checkNotNullParam("username", username); Assert.checkNotNullParam("realm", realm); Assert.checkNotNullParam("digest", digest); return new RawDigestPassword(algorithm, username, realm, digest.clone()); } }
public boolean equals(final Object obj) { if (! (obj instanceof RawDigestPassword)) { return false; } RawDigestPassword other = (RawDigestPassword) obj; return Arrays.equals(digest, other.digest) && username.equals(other.username) && realm.equals(other.realm) && getAlgorithm().equals(other.getAlgorithm()); } }
public int hashCode() { return multiHashOrdered(multiHashOrdered(multiHashOrdered(Arrays.hashCode(digest), username.hashCode()), realm.hashCode()), 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 username the user name * @param realm the realm * @param digest the digest * @return the raw password implementation */ static DigestPassword createRaw(String algorithm, String username, String realm, byte[] digest) { Assert.checkNotNullParam("algorithm", algorithm); Assert.checkNotNullParam("username", username); Assert.checkNotNullParam("realm", realm); Assert.checkNotNullParam("digest", digest); return new RawDigestPassword(algorithm, username, realm, digest.clone()); } }
public boolean equals(final Object obj) { if (! (obj instanceof RawDigestPassword)) { return false; } RawDigestPassword other = (RawDigestPassword) obj; return Arrays.equals(digest, other.digest) && username.equals(other.username) && realm.equals(other.realm) && getAlgorithm().equals(other.getAlgorithm()); } }
/** * 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 username the user name * @param realm the realm * @param digest the digest * @return the raw password implementation */ static DigestPassword createRaw(String algorithm, String username, String realm, byte[] digest) { Assert.checkNotNullParam("algorithm", algorithm); Assert.checkNotNullParam("username", username); Assert.checkNotNullParam("realm", realm); Assert.checkNotNullParam("digest", digest); return new RawDigestPassword(algorithm, username, realm, digest.clone()); } }
public boolean equals(final Object obj) { if (! (obj instanceof RawDigestPassword)) { return false; } RawDigestPassword other = (RawDigestPassword) obj; return Arrays.equals(digest, other.digest) && username.equals(other.username) && realm.equals(other.realm) && getAlgorithm().equals(other.getAlgorithm()); } }
/** * 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 username the user name * @param realm the realm * @param digest the digest * @return the raw password implementation */ static DigestPassword createRaw(String algorithm, String username, String realm, byte[] digest) { Assert.checkNotNullParam("algorithm", algorithm); Assert.checkNotNullParam("username", username); Assert.checkNotNullParam("realm", realm); Assert.checkNotNullParam("digest", digest); return new RawDigestPassword(algorithm, username, realm, digest.clone()); } }
public boolean equals(final Object obj) { if (! (obj instanceof RawDigestPassword)) { return false; } RawDigestPassword other = (RawDigestPassword) obj; return Arrays.equals(digest, other.digest) && username.equals(other.username) && realm.equals(other.realm) && getAlgorithm().equals(other.getAlgorithm()); } }
public int hashCode() { return multiHashOrdered(multiHashOrdered(multiHashOrdered(Arrays.hashCode(digest), username.hashCode()), realm.hashCode()), getAlgorithm().hashCode()); }
public int hashCode() { return multiHashOrdered(multiHashOrdered(multiHashOrdered(Arrays.hashCode(digest), username.hashCode()), realm.hashCode()), getAlgorithm().hashCode()); }
public int hashCode() { return multiHashOrdered(multiHashOrdered(multiHashOrdered(Arrays.hashCode(digest), username.hashCode()), realm.hashCode()), getAlgorithm().hashCode()); }