[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: possible bug in sha and crc32 digest classes
From: |
Elizabeth Barham |
Subject: |
Re: possible bug in sha and crc32 digest classes |
Date: |
31 Dec 2002 19:56:02 -0600 |
> CommonC++ SHA1Digest and SHA156Digest of "pippo", respectivly:
> d012f68144ed0f121d3cc330a17eec528c2e7d59
> a2242ead55c94c3deb7cf2340bfef9d5bcaca22dfe66e646745ee4371c633fc8
That should be SHA256Digest, not SHA156Digest.
Anyway, I was concerned that maybe the raw digest was in error as
the output above has been massaged into a character representation for
an ostream. Perhaps all those excess zeroes were in memory but were
neatly removed when going out ostream...
(gdb) x/20xb d1_d
0x100ba920: 0xd0 0x12 0xf6 0x81 0x44 0xed 0x0f 0x12
0x100ba928: 0x1d 0x3c 0xc3 0x30 0xa1 0x7e 0xec 0x52
0x100ba930: 0x8c 0x2e 0x7d 0x59
(gdb) x/32xb d256_d
0x100ba938: 0xa2 0x24 0x2e 0xad 0x55 0xc9 0x4c 0x3d
0x100ba940: 0xeb 0x7c 0xf2 0x34 0x0b 0xfe 0xf9 0xd5
0x100ba948: 0xbc 0xac 0xa2 0x2d 0xfe 0x66 0xe6 0x46
0x100ba950: 0x74 0x5e 0xe4 0x37 0x1c 0x63 0x3f 0xc8
It looks good here.
Elizabeth