PageRenderTime 15ms CodeModel.GetById 10ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/specs/hashes/sha224.ds

http://github.com/wilkie/djehuty
Unknown | 19 lines | 15 code | 4 blank | 0 comment | 0 complexity | b2bc1763cb98e2f612a129529bbdc69a MD5 | raw file
 1module specs.hashes.sha224;
 2
 3import testing.support;
 4
 5import hashes.sha224;
 6
 7describe SHA224() {
 8	describe hash() {
 9		it should_hash_as_expected_for_string_literals() {
10			string s = HashSHA224.hash("a").toString();
11			should(s == "abd37534c7d9a2efb9465de931cd7055ffdb8879563ae98078d6d6d5");
12		}
13
14		it should_hash_the_empty_string() {
15			string s = HashSHA224.hash("").toString();
16			should(s == "d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f");
17		}
18	}
19}