Function isSameHash

Validates a password against an existing salted hash.

If sHash is a Hash!Digest, then sHash.digest MUST be non-null. Otherwise this function will have no other way to determine what digest to match against, and an UnknownDigestException will be thrown.

Prototypes

bool isSameHash(TDigest)(
  Password password,
  Hash!TDigest sHash,
  Salter!TDigest salter
);

bool isSameHash(TDigest)(
  Password password,
  Hash!TDigest sHash,
  Salter!Digest salter
);

bool isSameHash(TDigest)(
  Password password,
  DigestType!TDigest hash,
  Salt salt,
  Salter!TDigest salter
);

bool isSameHash()(
  Password password,
  ubyte[] hash,
  Salt salt,
  Digest digest,
  Salter!Digest salter
);

bool isSameHash()(
  Password password,
  ubyte[] hash,
  Salt salt,
  Salter!Digest salter
);

Optional Params

salter - Default value is 'toDelegate(&defaultSalter!TDigest)'

digest - Default value is 'new DefaultDigestClass()'

Authors

Copyright

License