Function sha256Of

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

Prototype

auto sha256Of(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

Copyright

License

Boost License 1.0