SimpleHashRequest

Simple implementation of {@link HashRequest} that can be used when interacting with a {@link HashService}.

Constructors

this
this(string algorithmName, ByteSource source, ByteSource salt, int iterations)

Creates a new SimpleHashRequest instance.

Members

Functions

getAlgorithmName
string getAlgorithmName()
Undocumented in source. Be warned that the author may not have intended to support it.
getIterations
int getIterations()
Undocumented in source. Be warned that the author may not have intended to support it.
getSalt
ByteSource getSalt()
Undocumented in source. Be warned that the author may not have intended to support it.
getSource
ByteSource getSource()
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From HashRequest

getSource
ByteSource getSource()

Returns the source data that will be hashed by a {@link HashService}. For example, this might be a {@code ByteSource} representation of a password, or file, etc.

getSalt
ByteSource getSalt()

Returns a salt to be used by the {@link HashService} during hash computation, or {@code null} if no salt is provided as part of the request. <p/> Note that a {@code null} value does not necessarily mean a salt won't be used at all - it just means that the request didn't include one. The servicing {@link HashService} is free to provide a salting strategy for a request, even if the request did not specify one.

getIterations
int getIterations()

Returns the number of requested hash iterations to be performed when computing the final {@code Hash} result. A non-positive (0 or less) indicates that the {@code HashService}'s default iteration configuration should be used. A positive value overrides the {@code HashService}'s configuration for a single request. <p/> Note that a {@code HashService} is free to ignore this number if it determines the number is not sufficient to meet a desired level of security.

getAlgorithmName
string getAlgorithmName()

Returns the name of the hash algorithm the {@code HashService} should use when computing the {@link Hash}, or {@code null} if the default algorithm configuration of the {@code HashService} should be used. A non-null value overrides the {@code HashService}'s configuration for a single request. <p/> Note that a {@code HashService} is free to ignore this value if it determines that the algorithm is not sufficient to meet a desired level of security.

Builder
class Builder

A Builder class representing the Builder design pattern for constructing {@link HashRequest} instances.

Meta