Mercurial > projects > dcrypt
comparison dcrypt/crypto/hashes/SHA1.d @ 6:5cb17e09d685
Minor edits to the unittests of hash functions and ciphers. Added AES and test vectors.
author | Thomas Dixon <reikon@reikon.us> |
---|---|
date | Sat, 16 Aug 2008 22:43:22 -0400 |
parents | a5789a7b3b3b |
children | 4589f8c5eb3c |
comparison
equal
deleted
inserted
replaced
5:cff9960a019c | 6:5cb17e09d685 |
---|---|
8 | 8 |
9 module dcrypt.crypto.hashes.SHA1; | 9 module dcrypt.crypto.hashes.SHA1; |
10 | 10 |
11 public import dcrypt.crypto.Hash; | 11 public import dcrypt.crypto.Hash; |
12 | 12 |
13 /** Implementation of SHA-1. */ | 13 /** |
14 * Implementation of the US NSA's SHA-1. | |
15 * | |
16 * Conforms: FIPS 180-1 | |
17 * References: http://www.itl.nist.gov/fipspubs/fip180-1.htm | |
18 * Bugs: SHA-1 is not cryptographically secure. | |
19 */ | |
14 class SHA1 : Hash { | 20 class SHA1 : Hash { |
15 protected uint h0, h1, h2, h3, h4; | 21 protected uint h0, h1, h2, h3, h4; |
16 | 22 |
17 this (void[] input_=null) { | 23 this (void[] input_=null) { |
18 reset(); | 24 reset(); |