Differences From Artifact [19853167ae]:
- File
src/OFSHA1Hash.h
— part of check-in
[d310aeee30]
at
2014-08-31 17:59:31
on branch trunk
— Rewrite OFSHA1Hash
The old one was based on a public domain implementation, which is
optimized for old compilers and quite unreadable. The new one is written
from scratch and designed to be readable and to exploit optimizations of
modern compilers. (user: js, size: 910) [annotate] [blame] [check-ins using]
To Artifact [9abc68012e]:
- File
src/OFSHA1Hash.h
— part of check-in
[46af1252a5]
at
2014-09-01 11:08:43
on branch trunk
— Add OFSHA256Hash
Took me some time to figure out the RFC is buggy and SSIG0(t-15) should
be SSIG0(W(t-15))... (user: js, size: 911) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
15 16 17 18 19 20 21 | */ #import "OFHash.h" /*! * @class OFSHA1Hash OFSHA1Hash.h ObjFW/OFSHA1Hash.h * | | | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | */ #import "OFHash.h" /*! * @class OFSHA1Hash OFSHA1Hash.h ObjFW/OFSHA1Hash.h * * @brief A class which provides functions to create an SHA-1 hash. */ @interface OFSHA1Hash: OFObject <OFHash> { uint32_t _state[5]; uint64_t _bits; union { uint8_t bytes[64]; uint32_t words[80]; } _buffer; size_t _bufferLength; bool _calculated; } @end |