View source code
Display the source code in std/digest/sha.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
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.

Function std.digest.sha.sha224Of

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

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

Example

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

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

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

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

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

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

ubyte[32] hash512_256 = sha512_256Of("abc");
writeln(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.