/specs/hashes/sha224.ds

http://github.com/wilkie/djehuty · Unknown · 19 lines · 15 code · 4 blank · 0 comment · 0 complexity · b2bc1763cb98e2f612a129529bbdc69a MD5 · raw file

  1. module specs.hashes.sha224;
  2. import testing.support;
  3. import hashes.sha224;
  4. describe SHA224() {
  5. describe hash() {
  6. it should_hash_as_expected_for_string_literals() {
  7. string s = HashSHA224.hash("a").toString();
  8. should(s == "abd37534c7d9a2efb9465de931cd7055ffdb8879563ae98078d6d6d5");
  9. }
  10. it should_hash_the_empty_string() {
  11. string s = HashSHA224.hash("").toString();
  12. should(s == "d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f");
  13. }
  14. }
  15. }