Const poison, use ANSI-style.

This commit is contained in:
thorpej 2003-08-26 20:12:22 +00:00
parent 793bc7ea32
commit e6430e4cf8
2 changed files with 12 additions and 22 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: arc4.c,v 1.4 2002/11/07 07:03:11 thorpej Exp $ */
/* $NetBSD: arc4.c,v 1.5 2003/08/26 20:12:22 thorpej Exp $ */
/*
* ARC4 implementation
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: arc4.c,v 1.4 2002/11/07 07:03:11 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: arc4.c,v 1.5 2003/08/26 20:12:22 thorpej Exp $");
#include <sys/types.h>
@ -44,16 +44,13 @@ struct arc4_ctx {
};
int
arc4_ctxlen()
arc4_ctxlen(void)
{
return sizeof(struct arc4_ctx);
}
void
arc4_setkey(ctxp, key, keylen)
void *ctxp;
unsigned char *key;
unsigned int keylen;
arc4_setkey(void *ctxp, const u_char *key, u_int keylen)
{
struct arc4_ctx *ctx = ctxp;
unsigned int i, t, u, ki, si;
@ -77,11 +74,7 @@ arc4_setkey(ctxp, key, keylen)
}
void
arc4_encrypt(ctxp, dst, src, len)
void *ctxp;
unsigned char *dst;
unsigned char *src;
int len;
arc4_encrypt(void *ctxp, u_char *dst, const u_char *src, int len)
{
struct arc4_ctx *ctx = ctxp;
unsigned int x, y, sx, sy;
@ -104,11 +97,8 @@ arc4_encrypt(ctxp, dst, src, len)
}
void
arc4_decrypt(ctxp, dst, src, len)
void *ctxp;
unsigned char *dst;
unsigned char *src;
int len;
arc4_decrypt(void *ctxp, u_char *dst, const u_char *src, int len)
{
arc4_encrypt(ctxp, dst, src, len);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: arc4.h,v 1.2 2002/11/07 07:03:12 thorpej Exp $ */
/* $NetBSD: arc4.h,v 1.3 2003/08/26 20:12:22 thorpej Exp $ */
/*
* ARC4 implementation
@ -32,9 +32,9 @@
#ifndef _CRYPTO_ARC4_H_
#define _CRYPTO_ARC4_H_
int arc4_ctxlen __P((void));
void arc4_setkey __P((void *, unsigned char *, unsigned int));
void arc4_encrypt __P((void *, unsigned char *, unsigned char *, int));
void arc4_decrypt __P((void *, unsigned char *, unsigned char *, int));
int arc4_ctxlen(void);
void arc4_setkey(void *, const u_char *, unsigned int);
void arc4_encrypt(void *, u_char *, const u_char *, int);
void arc4_decrypt(void *, u_char *, const u_char *, int);
#endif /* _CRYPTO_ARC4_H_ */