/** * 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 hash the hash * @param seed the seed * @param sequenceNumber the sequence number * @return the raw password implementation */ static OneTimePassword createRaw(String algorithm, byte[] hash, String seed, int sequenceNumber) { Assert.checkNotNullParam("hash", hash); Assert.checkNotNullParam("seed", seed); Assert.checkNotNullParam("algorithm", algorithm); return new RawOneTimePassword(algorithm, hash.clone(), seed, sequenceNumber); } }
public boolean equals(final Object obj) { if (! (obj instanceof RawOneTimePassword)) { return false; } RawOneTimePassword other = (RawOneTimePassword) obj; return sequenceNumber == other.sequenceNumber && getAlgorithm().equals(other.getAlgorithm()) && Arrays.equals(hash, other.hash) && seed.equals(other.seed); } }
public int hashCode() { return multiHashOrdered(multiHashOrdered(multiHashOrdered(Arrays.hashCode(hash), seed.hashCode()), sequenceNumber), 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 hash the hash * @param seed the seed * @param sequenceNumber the sequence number * @return the raw password implementation */ static OneTimePassword createRaw(String algorithm, byte[] hash, String seed, int sequenceNumber) { Assert.checkNotNullParam("hash", hash); Assert.checkNotNullParam("seed", seed); Assert.checkNotNullParam("algorithm", algorithm); return new RawOneTimePassword(algorithm, hash.clone(), seed, sequenceNumber); } }
public boolean equals(final Object obj) { if (! (obj instanceof RawOneTimePassword)) { return false; } RawOneTimePassword other = (RawOneTimePassword) obj; return sequenceNumber == other.sequenceNumber && getAlgorithm().equals(other.getAlgorithm()) && Arrays.equals(hash, other.hash) && seed.equals(other.seed); } }
/** * 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 hash the hash * @param seed the seed * @param sequenceNumber the sequence number * @return the raw password implementation */ static OneTimePassword createRaw(String algorithm, byte[] hash, String seed, int sequenceNumber) { Assert.checkNotNullParam("hash", hash); Assert.checkNotNullParam("seed", seed); Assert.checkNotNullParam("algorithm", algorithm); return new RawOneTimePassword(algorithm, hash.clone(), seed, sequenceNumber); } }
public boolean equals(final Object obj) { if (! (obj instanceof RawOneTimePassword)) { return false; } RawOneTimePassword other = (RawOneTimePassword) obj; return sequenceNumber == other.sequenceNumber && getAlgorithm().equals(other.getAlgorithm()) && Arrays.equals(hash, other.hash) && seed.equals(other.seed); } }
/** * 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 hash the hash * @param seed the seed * @param sequenceNumber the sequence number * @return the raw password implementation */ static OneTimePassword createRaw(String algorithm, byte[] hash, String seed, int sequenceNumber) { Assert.checkNotNullParam("hash", hash); Assert.checkNotNullParam("seed", seed); Assert.checkNotNullParam("algorithm", algorithm); return new RawOneTimePassword(algorithm, hash.clone(), seed, sequenceNumber); } }
public boolean equals(final Object obj) { if (! (obj instanceof RawOneTimePassword)) { return false; } RawOneTimePassword other = (RawOneTimePassword) obj; return sequenceNumber == other.sequenceNumber && getAlgorithm().equals(other.getAlgorithm()) && Arrays.equals(hash, other.hash) && seed.equals(other.seed); } }
public int hashCode() { return multiHashOrdered(multiHashOrdered(multiHashOrdered(Arrays.hashCode(hash), seed.hashCode()), sequenceNumber), getAlgorithm().hashCode()); }
public int hashCode() { return multiHashOrdered(multiHashOrdered(multiHashOrdered(Arrays.hashCode(hash), seed.hashCode()), sequenceNumber), getAlgorithm().hashCode()); }
public int hashCode() { return multiHashOrdered(multiHashOrdered(multiHashOrdered(Arrays.hashCode(hash), seed.hashCode()), sequenceNumber), getAlgorithm().hashCode()); }