diff options
author | Niels Möller <nisse@lysator.liu.se> | 2005-10-02 22:53:57 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2005-10-02 22:53:57 +0200 |
commit | 5b3034b74ccb06ce4ee0ff213a1c1d13e4295a7a (patch) | |
tree | fe45aac2feec80cb3ea8a8987893bf8b14a3290c /sha1-compress.c | |
parent | e3df06a047a0b226445f78de868fcbfbd2cddf2f (diff) | |
download | nettle-5b3034b74ccb06ce4ee0ff213a1c1d13e4295a7a.tar.gz |
(_nettle_sha1_compress): Updated to new
interface. Now responsible for byte conversion.
Rev: src/nettle/sha1-compress.c:1.2
Diffstat (limited to 'sha1-compress.c')
-rw-r--r-- | sha1-compress.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sha1-compress.c b/sha1-compress.c index 83ba7aad..b8ee02fe 100644 --- a/sha1-compress.c +++ b/sha1-compress.c @@ -110,14 +110,19 @@ /* Perform the SHA transformation. Note that this code, like MD5, seems to break some optimizing compilers due to the complexity of the expressions and the size of the basic block. It may be necessary to split it into - sections, e.g. based on the four subrounds - - Note that this function destroys the data area */ + sections, e.g. based on the four subrounds. */ void -_nettle_sha1_compress(uint32_t *state, uint32_t *data) +_nettle_sha1_compress(uint32_t *state, const uint8_t *input) { + uint32_t data[16]; uint32_t A, B, C, D, E; /* Local vars */ + int i; + + for (i = 0; i < 16; i++, input+= 4) + { + data[i] = READ_UINT32(input); + } /* Set up first buffer and local data buffer */ A = state[0]; |