about summary refs log tree commit diff
path: root/src/libutil/sha1.h
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-02-13T19·52+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-02-13T19·52+0000
commitd6f586d0eaa9344a99248cc4dfb7825972f2a174 (patch)
treedb144d931fabfc85ad089591393886a9694e48c2 /src/libutil/sha1.h
parente8475bbd5b0c5505bb0536929e89efc8b0d4da5c (diff)
* Optional switch "--with-openssl=<PATH>" to use OpenSSL's
  implementations of MD5, SHA-1 and SHA-256.  The main benefit is that
  we get assembler-optimised implementations of MD5 and SHA-1 (though
  not SHA-256 (at least on x86), unfortunately).  OpenSSL's SHA-1
  implementation on Intel is twice as fast as ours.

Diffstat (limited to 'src/libutil/sha1.h')
-rw-r--r--src/libutil/sha1.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libutil/sha1.h b/src/libutil/sha1.h
index 5594f65b5f60..715040dd48df 100644
--- a/src/libutil/sha1.h
+++ b/src/libutil/sha1.h
@@ -11,18 +11,18 @@
 #define SHA_DIGESTLEN    5
 /* The structure for storing SHA info */
 
-struct sha_ctx {
+struct SHA_CTX {
   uint32_t digest[SHA_DIGESTLEN];  /* Message digest */
   uint32_t count_l, count_h;       /* 64-bit block count */
   uint8_t block[SHA_DATASIZE];     /* SHA data buffer */
   unsigned int index;            /* index into buffer */
 };
 
-void sha_init(struct sha_ctx *ctx);
-void sha_update(struct sha_ctx *ctx, const unsigned char *buffer, uint32_t len);
-void sha_final(struct sha_ctx *ctx);
-void sha_digest(struct sha_ctx *ctx, unsigned char *s);
-void sha_copy(struct sha_ctx *dest, struct sha_ctx *src);
+void SHA1_Init(struct SHA_CTX *ctx);
+void SHA1_Update(struct SHA_CTX *ctx, const unsigned char *buffer, uint32_t len);
+void SHA1_Final(unsigned char *s, struct SHA_CTX *ctx);
+void sha_digest(struct SHA_CTX *ctx, unsigned char *s);
+void sha_copy(struct SHA_CTX *dest, struct SHA_CTX *src);
 
 
 #endif /* !_SHA_H */