aboutsummaryrefslogtreecommitdiff
path: root/sys/opencrypto/rmd160.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2020-11-03 22:27:54 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2020-11-03 22:27:54 +0000
commitd3d79e968b67cc9a9855f9a29cf72763dec3578d (patch)
tree147b191c36e22e7964169780fb327d58b285233f /sys/opencrypto/rmd160.c
parent321b3540eb1afc2617b5ee3eb89ed98e02d2f311 (diff)
downloadsrc-d3d79e968b67cc9a9855f9a29cf72763dec3578d.tar.gz
src-d3d79e968b67cc9a9855f9a29cf72763dec3578d.zip
Consistently use C99 fixed-width types in the in-kernel crypto code.
Reviewed by: markj Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D27061
Notes
Notes: svn path=/head/; revision=367309
Diffstat (limited to 'sys/opencrypto/rmd160.c')
-rw-r--r--sys/opencrypto/rmd160.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/opencrypto/rmd160.c b/sys/opencrypto/rmd160.c
index f97a6f4dc857..0ca23649113d 100644
--- a/sys/opencrypto/rmd160.c
+++ b/sys/opencrypto/rmd160.c
@@ -106,9 +106,9 @@ RMD160Init(RMD160_CTX *ctx)
}
void
-RMD160Update(RMD160_CTX *ctx, const u_char *input, u_int32_t len)
+RMD160Update(RMD160_CTX *ctx, const u_char *input, uint32_t len)
{
- u_int32_t have, off, need;
+ uint32_t have, off, need;
have = (ctx->count/8) % 64;
need = 64 - have;
@@ -137,7 +137,7 @@ RMD160Final(u_char digest[20], RMD160_CTX *ctx)
{
int i;
u_char size[8];
- u_int32_t padlen;
+ uint32_t padlen;
PUT_64BIT_LE(size, ctx->count);
@@ -159,9 +159,9 @@ RMD160Final(u_char digest[20], RMD160_CTX *ctx)
}
void
-RMD160Transform(u_int32_t state[5], const u_char block[64])
+RMD160Transform(uint32_t state[5], const u_char block[64])
{
- u_int32_t a, b, c, d, e, aa, bb, cc, dd, ee, t, x[16];
+ uint32_t a, b, c, d, e, aa, bb, cc, dd, ee, t, x[16];
#if BYTE_ORDER == LITTLE_ENDIAN
memcpy(x, block, 64);
@@ -169,7 +169,7 @@ RMD160Transform(u_int32_t state[5], const u_char block[64])
int i;
for (i = 0; i < 16; i++)
- x[i] = bswap32(*(const u_int32_t*)(block+i*4));
+ x[i] = bswap32(*(const uint32_t*)(block+i*4));
#endif
a = state[0];