73#if COAP_WS_SUPPORT && !defined(COAP_WITH_LIBOPENSSL) && !defined(COAP_WITH_LIBGNUTLS) && !defined(COAP_WITH_LIBMBEDTLS) && !defined(COAP_WITH_LIBWOLFSSL)
77#define SHA1CircularShift(bits,word) \
78 (((word) << (bits)) | ((word) >> (32-(bits))))
145 if (!context || !Message_Digest) {
154 SHA1PadMessage(context);
155 for (i=0; i<64; ++i) {
166 >> 8 * (3 - (i & 0x03));
194 const uint8_t *message_array,
200 if (!context || !message_array) {
212 while (length-- && !context->
Corrupted) {
214 (*message_array & 0xFF);
226 SHA1ProcessMessageBlock(context);
257 const uint32_t K[] = {
266 uint32_t A, B, C, D, E;
271 for (t = 0; t < 16; t++) {
278 for (t = 16; t < 80; t++) {
279 W[t] = SHA1CircularShift(1,W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]);
288 for (t = 0; t < 20; t++) {
289 temp = SHA1CircularShift(5,A) +
290 ((B & C) | ((~B) & D)) + E + W[t] + K[0];
293 C = SHA1CircularShift(30,B);
298 for (t = 20; t < 40; t++) {
299 temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[1];
302 C = SHA1CircularShift(30,B);
307 for (t = 40; t < 60; t++) {
308 temp = SHA1CircularShift(5,A) +
309 ((B & C) | (B & D) | (C & D)) + E + W[t] + K[2];
312 C = SHA1CircularShift(30,B);
317 for (t = 60; t < 80; t++) {
318 temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[3];
321 C = SHA1CircularShift(30,B);
373 SHA1ProcessMessageBlock(context);
397 SHA1ProcessMessageBlock(context);
Library specific build wrapper for coap_internal.h.
int SHA1Result(SHA1Context *, uint8_t Message_Digest[SHA1HashSize])
int SHA1Reset(SHA1Context *)
int SHA1Input(SHA1Context *, const uint8_t *, unsigned int)
uint32_t Intermediate_Hash[SHA1HashSize/4]
uint8_t Message_Block[64]
int_least16_t Message_Block_Index