Hash.toCryptString

Just like toString, but instead of standard DAuth-style format, the output string is in the crypt(3)-style format.

The crypt(3) format does not support all hash types, and DAuth doesn't necessarily support all possible forms of crypt(3) hashes (although it does strive to support as many as possible).

DAuth currently supports crypt(3)-style format for MD5, SHA256 and SHA512 hashes. Other hashes (unless manually handled by a custom digestCodeOfObj) will cause an UnknownDigestException to be thrown.

The default digestCodeOfObj for this function is defaultDigestCryptCodeOfObj.

More...
  1. string toCryptString(string delegate(Digest) digestCodeOfObj = toDelegate(&defaultDigestCryptCodeOfObj))
  2. void toCryptString(ref Sink sink, string delegate(Digest) digestCodeOfObj = toDelegate(&defaultDigestCryptCodeOfObj))
    struct Hash(TDigest)
    void
    toCryptString
    (
    Sink
    )
    (
    ref Sink sink
    ,
    string delegate(
    Digest
    )
    digestCodeOfObj = toDelegate(&defaultDigestCryptCodeOfObj)
    )
    if (
    isOutputRange!(Sink, const(char))
    )
    if (
    isAnyDigest!TDigest
    )

Detailed Description

Optional Params

digestCodeOfObj - Default value is 'toDelegate(&defaultDigestCryptCodeOfObj)'

See also: https://en.wikipedia.org/wiki/Crypt_%28C%29

Meta