View source code Display the source code in std/digest/sha.d from which this page was generated on github. Improve this page Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone. Page wiki View or edit the community-maintained wiki page associated with this page.

Function std.digest.sha.sha224Of

These are convenience aliases for std.digest.digest.digest using the SHA implementation.

Prototype

auto sha224Of(T...)(
  T data
);

Example

ubyte[20] hash = sha1Of("abc");
assert(hash == digest!SHA1("abc"));

ubyte[28] hash224 = sha224Of("abc");
assert(hash224 == digest!SHA224("abc"));

ubyte[32] hash256 = sha256Of("abc");
assert(hash256 == digest!SHA256("abc"));

ubyte[48] hash384 = sha384Of("abc");
assert(hash384 == digest!SHA384("abc"));

ubyte[64] hash512 = sha512Of("abc");
assert(hash512 == digest!SHA512("abc"));

ubyte[28] hash512_224 = sha512_224Of("abc");
assert(hash512_224 == digest!SHA512_224("abc"));

ubyte[32] hash512_256 = sha512_256Of("abc");
assert(hash512_256 == digest!SHA512_256("abc"));

Authors

The routines and algorithms are derived from the Secure Hash Signature Standard (SHS) (FIPS PUB 180-2).
Kai Nacke, Johannes Pfau, Nick Sabalausky

License

Boost License 1.0.

Comments