Revert "sha1: Use bswap* to optimize byte order"
This reverts commit 259b660f6a51be7f627e7c2a6376af0b21b55fbb.
This was triggering the new ssp checks and killing processes
diff --git a/libc/include/sha1.h b/libc/include/sha1.h
index bc51ac0..adfa1fc 100644
--- a/libc/include/sha1.h
+++ b/libc/include/sha1.h
@@ -13,17 +13,16 @@
#include <sys/types.h>
#define SHA1_DIGEST_LENGTH 20
-#define SHA1_BLOCK_SIZE 64
+#define SHA1_DIGEST_STRING_LENGTH 41
typedef struct {
- uint64_t count;
- uint32_t state[SHA1_DIGEST_LENGTH / 4];
- uint8_t buffer[SHA1_BLOCK_SIZE];
+ uint32_t state[5];
+ uint32_t count[2];
+ uint8_t buffer[64];
} SHA1_CTX;
__BEGIN_DECLS
-void SHA1Transform(uint32_t[SHA1_DIGEST_LENGTH/4],
- const uint8_t[SHA1_BLOCK_SIZE]);
+void SHA1Transform(uint32_t[5], const uint8_t[64]);
void SHA1Init(SHA1_CTX *);
void SHA1Update(SHA1_CTX *, const uint8_t *, unsigned int);
void SHA1Final(uint8_t[SHA1_DIGEST_LENGTH], SHA1_CTX *);