Differences From Artifact [5f01203690]:
- File
sha1.c
— part of check-in
[5027cbae9b]
at
2011-08-26 05:29:43
on branch trunk
— Updated to include DoD root CAs as objects in the PKCS#11 module
Updated to include Netscape Trust Objects (https://developer.mozilla.org/index.php?title=en/NSS/PKCS_%2311_Netscape_Trust) in PKCS#11 module
Added more attributes to scan for to test driver (user: rkeene, size: 10262) [annotate] [blame] [check-ins using]
To Artifact [a03e9d2d38]:
- File
sha1.c
— part of check-in
[02f5cea2da]
at
2011-09-08 01:47:17
on branch trunk
— CACKey 0.6.2
Updated to include sha1.c, md5.c, and asn1-x509.c in the cackey.c translation unit so that these symbols never get exported and conflict with existing programs
Updated to try harder to remove and weaken symbols from shared object (user: rkeene, size: 10311) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
34 35 36 37 38 39 40 | /* * Define the SHA1 circular left shift macro */ #define SHA1CircularShift(bits,word) \ (((word) << (bits)) | ((word) >> (32-(bits)))) /* Local Function Prototyptes */ | | | | | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | /* * Define the SHA1 circular left shift macro */ #define SHA1CircularShift(bits,word) \ (((word) << (bits)) | ((word) >> (32-(bits)))) /* Local Function Prototyptes */ static void SHA1PadMessage(SHA1Context *); static void SHA1ProcessMessageBlock(SHA1Context *); /* * SHA1Reset * * Description: * This function will initialize the SHA1Context in preparation * for computing a new SHA1 message digest. * * Parameters: * context: [in/out] * The context to reset. * * Returns: * sha Error Code. * */ static int SHA1Reset(SHA1Context *context) { if (!context) { return shaNull; } context->Length_Low = 0; |
︙ | ︙ | |||
94 95 96 97 98 99 100 | * Message_Digest: [out] * Where the digest is returned. * * Returns: * sha Error Code. * */ | | | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | * Message_Digest: [out] * Where the digest is returned. * * Returns: * sha Error Code. * */ static int SHA1Result( SHA1Context *context, uint8_t Message_Digest[SHA1HashSize]) { int i; if (!context || !Message_Digest) { return shaNull; |
︙ | ︙ | |||
151 152 153 154 155 156 157 | * length: [in] * The length of the message in message_array * * Returns: * sha Error Code. * */ | | | 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | * length: [in] * The length of the message in message_array * * Returns: * sha Error Code. * */ static int SHA1Input( SHA1Context *context, const uint8_t *message_array, unsigned length) { if (!length) { return shaSuccess; } |
︙ | ︙ | |||
223 224 225 226 227 228 229 | * Comments: * Many of the variable names in this code, especially the * single character names, were used because those were the * names used in the publication. * * */ | | | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | * Comments: * Many of the variable names in this code, especially the * single character names, were used because those were the * names used in the publication. * * */ static void SHA1ProcessMessageBlock(SHA1Context *context) { const uint32_t K[] = { /* Constants defined in SHA-1 */ 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6 }; |
︙ | ︙ | |||
333 334 335 336 337 338 339 | * ProcessMessageBlock: [in] * The appropriate SHA*ProcessMessageBlock function * Returns: * Nothing. * */ | | | 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 | * ProcessMessageBlock: [in] * The appropriate SHA*ProcessMessageBlock function * Returns: * Nothing. * */ static void SHA1PadMessage(SHA1Context *context) { /* * Check to see if the current message block is too small to hold * the initial padding bits and length. If so, we will pad the * block, process it, and then continue padding into a second * block. */ |
︙ | ︙ |