passwd.sha

Ulrich Drepper's SHA-based crypt(3) algorithms, as specified here: https://akkadia.org/drepper/SHA-crypt.txt

The main exports are the SHA256Crypt and SHA512Crypt structs. Their genSalt() static members take an optional count of rounds. More rounds means more work in computing the hash — both for friendly applications and password bruteforcers. The default (as in the spec) is 5000 rounds.

Public Imports

std.typecons
public import std.typecons : Flag, No, Yes;

Members

Aliases

SHA256Crypt
alias SHA256Crypt = SHACrypt!(SHA256, sha256crypt_output_swaps, "$5$")

Implementation of Ulrich Drepper's SHA256-based crypt algorithm

SHA512Crypt
alias SHA512Crypt = SHACrypt!(SHA512, sha512crypt_output_swaps, "$6$")

Implementation of Ulrich Drepper's SHA512-based crypt algorithm

Structs

SHACrypt
struct SHACrypt(Hasher, alias output_swaps, string algo_id)

Routines for SHA-based crypt(3) algorithms

Meta