sha1Of

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

Examples

1 t
2 {
3     ubyte[20] hash = sha1Of("abc");
4     assert(hash == digest!SHA1("abc"));
5 
6     ubyte[28] hash224 = sha224Of("abc");
7     assert(hash224 == digest!SHA224("abc"));
8 
9     ubyte[32] hash256 = sha256Of("abc");
10     assert(hash256 == digest!SHA256("abc"));
11 
12     ubyte[48] hash384 = sha384Of("abc");
13     assert(hash384 == digest!SHA384("abc"));
14 
15     ubyte[64] hash512 = sha512Of("abc");
16     assert(hash512 == digest!SHA512("abc"));
17 
18     ubyte[28] hash512_224 = sha512_224Of("abc");
19     assert(hash512_224 == digest!SHA512_224("abc"));
20 
21     ubyte[32] hash512_256 = sha512_256Of("abc");
22     assert(hash512_256 == digest!SHA512_256("abc")

Meta