diff options
Diffstat (limited to 'src/md5.h')
| -rw-r--r-- | src/md5.h | 17 |
1 files changed, 11 insertions, 6 deletions
| @@ -14,6 +14,8 @@ namespace Bu | |||
| 14 | { | 14 | { |
| 15 | /** | 15 | /** |
| 16 | * Class for easily calculating MD5 sums of just about any data. | 16 | * Class for easily calculating MD5 sums of just about any data. |
| 17 | * This code is based on some public domain code written by Colin Plumb in | ||
| 18 | * 1993. | ||
| 17 | *@author Mike Buland | 19 | *@author Mike Buland |
| 18 | */ | 20 | */ |
| 19 | class Md5 : public Bu::CryptoHash | 21 | class Md5 : public Bu::CryptoHash |
| @@ -36,13 +38,16 @@ namespace Bu | |||
| 36 | /** | 38 | /** |
| 37 | * Compute one block of input data. | 39 | * Compute one block of input data. |
| 38 | */ | 40 | */ |
| 39 | void compBlock( long *x, long *lsum ); | 41 | void compBlock( uint32_t *lsum, uint32_t *x ); |
| 40 | void compCap( long *sumout ); | 42 | void compCap( uint32_t *sumout ); |
| 43 | |||
| 44 | void _addData( uint8_t *target, int &iCurFill, const void *sData, | ||
| 45 | int iSize ); | ||
| 46 | void _toLittleEndian( uint8_t *buf, uint32_t count ); | ||
| 41 | 47 | ||
| 42 | long inbuf[16]; | 48 | uint8_t inbuf[64]; |
| 43 | long iFill; | 49 | uint32_t sum[4]; |
| 44 | long sum[4]; | 50 | uint32_t uBits[2]; |
| 45 | uint64_t iBytes; | ||
| 46 | }; | 51 | }; |
| 47 | }; | 52 | }; |
| 48 | 53 | ||
