dovecot-1.2: sha256_loop() takes now const void *data parameter.
dovecot at dovecot.org
dovecot at dovecot.org
Thu Nov 13 12:05:59 EET 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/44f3bf2d0671
changeset: 8393:44f3bf2d0671
user: Timo Sirainen <tss at iki.fi>
date: Thu Nov 13 12:05:28 2008 +0200
description:
sha256_loop() takes now const void *data parameter.
diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
src/lib/sha2.c | 4 ++--
src/lib/sha2.h | 2 +-
diffs (33 lines):
diff -r 3b6999dc112f -r 44f3bf2d0671 src/lib/sha2.c
--- a/src/lib/sha2.c Wed Nov 12 17:08:15 2008 +0200
+++ b/src/lib/sha2.c Thu Nov 13 12:05:28 2008 +0200
@@ -178,7 +178,7 @@ void sha256_init(struct sha256_ctx *ctx)
ctx->tot_len = 0;
}
-void sha256_loop(struct sha256_ctx *ctx, const unsigned char *data,
+void sha256_loop(struct sha256_ctx *ctx, const void *data,
size_t len)
{
const unsigned char *shifted_message;
@@ -198,7 +198,7 @@ void sha256_loop(struct sha256_ctx *ctx,
new_len = len - rem_len;
block_nb = new_len / SHA256_BLOCK_SIZE;
- shifted_message = data + rem_len;
+ shifted_message = CONST_PTR_OFFSET(data, rem_len);
sha256_transf(ctx, ctx->block, 1);
sha256_transf(ctx, shifted_message, block_nb);
diff -r 3b6999dc112f -r 44f3bf2d0671 src/lib/sha2.h
--- a/src/lib/sha2.h Wed Nov 12 17:08:15 2008 +0200
+++ b/src/lib/sha2.h Thu Nov 13 12:05:28 2008 +0200
@@ -45,7 +45,7 @@ struct sha256_ctx {
};
void sha256_init(struct sha256_ctx *ctx);
-void sha256_loop(struct sha256_ctx *ctx, const unsigned char *data, size_t len);
+void sha256_loop(struct sha256_ctx *ctx, const void *data, size_t len);
void sha256_result(struct sha256_ctx *ctx,
unsigned char digest[SHA256_RESULTLEN]);
More information about the dovecot-cvs
mailing list