Function 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.

Prototypes

string toCryptString(
  string delegate(Digest) digestCodeOfObj
);

void toCryptString(Sink)(
  ref Sink sink,
  string delegate(Digest) digestCodeOfObj
);

Optional Params

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

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

Authors

Copyright

License