Tiger2_128Digest

OOP API for Tiger2-128(3 pass)

alias Tiger2_128Digest = WrapperDigest!Tiger2_128

Examples

1 Tiger st;
2 st.start();
3 st.put(cast(ubyte[])"The quick brown fox jumps over the lazy dog");
4 assert(st.finish() == hexString!"6D12A41E72E644F017B6F0E2F7B44C6285F06DD5D2C5B075");
5 
6 // Template API
7 assert(digest!Tiger("abc") == hexString!"2AAB1484E8C158F2BFB8C5FF41B57A525129131C957B5F93");
8 assert(digest!Tiger160("abc") == hexString!"2AAB1484E8C158F2BFB8C5FF41B57A525129131C");
9 assert(digest!Tiger128("abc") == hexString!"2AAB1484E8C158F2BFB8C5FF41B57A52");
10 
11 assert(digest!Tiger2("abc") == hexString!"F68D7BC5AF4B43A06E048D7829560D4A9415658BB0B1F3BF");
12 
13 // OOP API
14 Digest t = new TigerDigest;
15 t.put(cast(ubyte[])"Tiger");
16 assert(t.finish() == hexString!"DD00230799F5009FEC6DEBC838BB6A27DF2B9D6F110C7937");
17 
18 t = new Tiger160Digest;
19 t.put(cast(ubyte[])"Tiger");
20 assert(t.finish() == hexString!"DD00230799F5009FEC6DEBC838BB6A27DF2B9D6F");
21 
22 t = new Tiger128Digest;
23 t.put(cast(ubyte[])"Tiger");
24 assert(t.finish() == hexString!"DD00230799F5009FEC6DEBC838BB6A27");
25 
26 t = new Tiger2Digest;
27 t.put(cast(ubyte[])"Tiger");
28 assert(t.finish() == hexString!"FE40798B8EB937FD977608930548D6A894C20B04CBEF7A42");

Meta