Browse Source

Make the `filename' parameter to HASHFile() and HASHFileChunk() const

ok pedro@, millert@
OPENBSD_3_6
jfb 20 years ago
parent
commit
7a1e9128cc
10 changed files with 35 additions and 35 deletions
  1. +3
    -3
      src/include/md4.h
  2. +3
    -3
      src/include/md5.h
  3. +3
    -3
      src/include/rmd160.h
  4. +3
    -3
      src/include/sha1.h
  5. +7
    -7
      src/include/sha2.h
  6. +4
    -4
      src/lib/libc/hash/helper.c
  7. +3
    -3
      src/lib/libc/hash/mdX.3
  8. +3
    -3
      src/lib/libc/hash/rmd160.3
  9. +3
    -3
      src/lib/libc/hash/sha1.3
  10. +3
    -3
      src/lib/libc/hash/sha2.3

+ 3
- 3
src/include/md4.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: md4.h,v 1.14 2004/05/03 17:30:14 millert Exp $ */
/* $OpenBSD: md4.h,v 1.15 2004/06/22 01:57:30 jfb Exp $ */
/*
* This code implements the MD4 message-digest algorithm.
@ -40,9 +40,9 @@ void MD4Transform(u_int32_t [4], const u_int8_t [MD4_BLOCK_LENGTH])
__attribute__((__bounded__(__minbytes__,2,MD4_BLOCK_LENGTH)));
char *MD4End(MD4_CTX *, char *)
__attribute__((__bounded__(__minbytes__,2,MD4_DIGEST_STRING_LENGTH)));
char *MD4File(char *, char *)
char *MD4File(const char *, char *)
__attribute__((__bounded__(__minbytes__,2,MD4_DIGEST_STRING_LENGTH)));
char *MD4FileChunk(char *, char *, off_t, off_t)
char *MD4FileChunk(const char *, char *, off_t, off_t)
__attribute__((__bounded__(__minbytes__,2,MD4_DIGEST_STRING_LENGTH)));
char *MD4Data(const u_int8_t *, size_t, char *)
__attribute__((__bounded__(__string__,1,2)))


+ 3
- 3
src/include/md5.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: md5.h,v 1.15 2004/05/03 17:30:14 millert Exp $ */
/* $OpenBSD: md5.h,v 1.16 2004/06/22 01:57:30 jfb Exp $ */
/*
* This code implements the MD5 message-digest algorithm.
@ -39,9 +39,9 @@ void MD5Transform(u_int32_t [4], const u_int8_t [MD5_BLOCK_LENGTH])
__attribute__((__bounded__(__minbytes__,2,MD5_BLOCK_LENGTH)));
char *MD5End(MD5_CTX *, char *)
__attribute__((__bounded__(__minbytes__,2,MD5_DIGEST_STRING_LENGTH)));
char *MD5File(char *, char *)
char *MD5File(const char *, char *)
__attribute__((__bounded__(__minbytes__,2,MD5_DIGEST_STRING_LENGTH)));
char *MD5FileChunk(char *, char *, off_t, off_t)
char *MD5FileChunk(const char *, char *, off_t, off_t)
__attribute__((__bounded__(__minbytes__,2,MD5_DIGEST_STRING_LENGTH)));
char *MD5Data(const u_int8_t *, size_t, char *)
__attribute__((__bounded__(__string__,1,2)))


+ 3
- 3
src/include/rmd160.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: rmd160.h,v 1.15 2004/05/03 17:30:14 millert Exp $ */
/* $OpenBSD: rmd160.h,v 1.16 2004/06/22 01:57:30 jfb Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
*
@ -50,9 +50,9 @@ void RMD160Final(u_int8_t [RMD160_DIGEST_LENGTH], RMD160_CTX *)
__attribute__((__bounded__(__minbytes__,1,RMD160_DIGEST_LENGTH)));
char *RMD160End(RMD160_CTX *, char *)
__attribute__((__bounded__(__minbytes__,2,RMD160_DIGEST_STRING_LENGTH)));
char *RMD160File(char *, char *)
char *RMD160File(const char *, char *)
__attribute__((__bounded__(__minbytes__,2,RMD160_DIGEST_STRING_LENGTH)));
char *RMD160FileChunk(char *, char *, off_t, off_t)
char *RMD160FileChunk(const char *, char *, off_t, off_t)
__attribute__((__bounded__(__minbytes__,2,RMD160_DIGEST_STRING_LENGTH)));
char *RMD160Data(const u_int8_t *, size_t, char *)
__attribute__((__bounded__(__string__,1,2)))


+ 3
- 3
src/include/sha1.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: sha1.h,v 1.22 2004/05/05 17:09:45 millert Exp $ */
/* $OpenBSD: sha1.h,v 1.23 2004/06/22 01:57:30 jfb Exp $ */
/*
* SHA-1 in C
@ -33,9 +33,9 @@ void SHA1Final(u_int8_t [SHA1_DIGEST_LENGTH], SHA1_CTX *)
__attribute__((__bounded__(__minbytes__,1,SHA1_DIGEST_LENGTH)));
char *SHA1End(SHA1_CTX *, char *)
__attribute__((__bounded__(__minbytes__,2,SHA1_DIGEST_STRING_LENGTH)));
char *SHA1File(char *, char *)
char *SHA1File(const char *, char *)
__attribute__((__bounded__(__minbytes__,2,SHA1_DIGEST_STRING_LENGTH)));
char *SHA1FileChunk(char *, char *, off_t, off_t)
char *SHA1FileChunk(const char *, char *, off_t, off_t)
__attribute__((__bounded__(__minbytes__,2,SHA1_DIGEST_STRING_LENGTH)));
char *SHA1Data(const u_int8_t *, size_t, char *)
__attribute__((__bounded__(__string__,1,2)))


+ 7
- 7
src/include/sha2.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: sha2.h,v 1.5 2004/05/05 17:39:47 millert Exp $ */
/* $OpenBSD: sha2.h,v 1.6 2004/06/22 01:57:30 jfb Exp $ */
/*
* FILE: sha2.h
@ -76,9 +76,9 @@ void SHA256_Final(u_int8_t [SHA256_DIGEST_LENGTH], SHA256_CTX *)
__attribute__((__bounded__(__minbytes__,1,SHA256_DIGEST_LENGTH)));
char *SHA256_End(SHA256_CTX *, char *)
__attribute__((__bounded__(__minbytes__,2,SHA256_DIGEST_STRING_LENGTH)));
char *SHA256_File(char *, char *)
char *SHA256_File(const char *, char *)
__attribute__((__bounded__(__minbytes__,2,SHA256_DIGEST_STRING_LENGTH)));
char *SHA256_FileChunk(char *, char *, off_t, off_t)
char *SHA256_FileChunk(const char *, char *, off_t, off_t)
__attribute__((__bounded__(__minbytes__,2,SHA256_DIGEST_STRING_LENGTH)));
char *SHA256_Data(const u_int8_t *, size_t, char *)
__attribute__((__bounded__(__string__,1,2)))
@ -93,9 +93,9 @@ void SHA384_Final(u_int8_t [SHA384_DIGEST_LENGTH], SHA384_CTX *)
__attribute__((__bounded__(__minbytes__,1,SHA384_DIGEST_LENGTH)));
char *SHA384_End(SHA384_CTX *, char *)
__attribute__((__bounded__(__minbytes__,2,SHA384_DIGEST_STRING_LENGTH)));
char *SHA384_File(char *, char *)
char *SHA384_File(const char *, char *)
__attribute__((__bounded__(__minbytes__,2,SHA384_DIGEST_STRING_LENGTH)));
char *SHA384_FileChunk(char *, char *, off_t, off_t)
char *SHA384_FileChunk(const char *, char *, off_t, off_t)
__attribute__((__bounded__(__minbytes__,2,SHA384_DIGEST_STRING_LENGTH)));
char *SHA384_Data(const u_int8_t *, size_t, char *)
__attribute__((__bounded__(__string__,1,2)))
@ -110,9 +110,9 @@ void SHA512_Final(u_int8_t [SHA512_DIGEST_LENGTH], SHA512_CTX *)
__attribute__((__bounded__(__minbytes__,1,SHA512_DIGEST_LENGTH)));
char *SHA512_End(SHA512_CTX *, char *)
__attribute__((__bounded__(__minbytes__,2,SHA512_DIGEST_STRING_LENGTH)));
char *SHA512_File(char *, char *)
char *SHA512_File(const char *, char *)
__attribute__((__bounded__(__minbytes__,2,SHA512_DIGEST_STRING_LENGTH)));
char *SHA512_FileChunk(char *, char *, off_t, off_t)
char *SHA512_FileChunk(const char *, char *, off_t, off_t)
__attribute__((__bounded__(__minbytes__,2,SHA512_DIGEST_STRING_LENGTH)));
char *SHA512_Data(const u_int8_t *, size_t, char *)
__attribute__((__bounded__(__string__,1,2)))


+ 4
- 4
src/lib/libc/hash/helper.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: helper.c,v 1.5 2004/05/03 17:30:14 millert Exp $ */
/* $OpenBSD: helper.c,v 1.6 2004/06/22 01:57:29 jfb Exp $ */
/*
* ----------------------------------------------------------------------------
@ -10,7 +10,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char rcsid[] = "$OpenBSD: helper.c,v 1.5 2004/05/03 17:30:14 millert Exp $";
static const char rcsid[] = "$OpenBSD: helper.c,v 1.6 2004/06/22 01:57:29 jfb Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@ -46,7 +46,7 @@ HASHEnd(HASH_CTX *ctx, char *buf)
}
char *
HASHFileChunk(char *filename, char *buf, off_t off, off_t len)
HASHFileChunk(const char *filename, char *buf, off_t off, off_t len)
{
u_char buffer[BUFSIZ];
HASH_CTX ctx;
@ -73,7 +73,7 @@ HASHFileChunk(char *filename, char *buf, off_t off, off_t len)
}
char *
HASHFile(char *filename, char *buf)
HASHFile(const char *filename, char *buf)
{
return (HASHFileChunk(filename, buf, (off_t)0, (off_t)0));
}


+ 3
- 3
src/lib/libc/hash/mdX.3 View File

@ -6,7 +6,7 @@
.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
.\" ----------------------------------------------------------------------------
.\"
.\" $OpenBSD: mdX.3,v 1.6 2004/05/16 18:29:09 otto Exp $
.\" $OpenBSD: mdX.3,v 1.7 2004/06/22 01:57:29 jfb Exp $
.\"
.Dd April 29, 2004
.Dt MDX 3
@ -38,9 +38,9 @@
.Ft "char *"
.Fn MDXEnd "MDX_CTX *context" "char *buf"
.Ft "char *"
.Fn MDXFile "char *filename" "char *buf"
.Fn MDXFile "const char *filename" "char *buf"
.Ft "char *"
.Fn MDXFileChunk "char *filename" "char *buf" "off_t offset" "off_t length"
.Fn MDXFileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
.Ft "char *"
.Fn MDXData "const u_int8_t *data" "size_t len" "char *buf"
.Sh DESCRIPTION


+ 3
- 3
src/lib/libc/hash/rmd160.3 View File

@ -1,4 +1,4 @@
.\" $OpenBSD: rmd160.3,v 1.25 2004/05/16 18:29:09 otto Exp $
.\" $OpenBSD: rmd160.3,v 1.26 2004/06/22 01:57:29 jfb Exp $
.\"
.\" Copyright (c) 1997, 2004 Todd C. Miller <Todd.Miller@courtesan.com>
.\"
@ -47,9 +47,9 @@
.Ft "char *"
.Fn RMD160End "RMD160_CTX *context" "char *buf"
.Ft "char *"
.Fn RMD160File "char *filename" "char *buf"
.Fn RMD160File "const char *filename" "char *buf"
.Ft "char *"
.Fn RMD160FileChunk "char *filename" "char *buf" "off_t offset" "off_t length"
.Fn RMD160FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
.Ft "char *"
.Fn RMD160Data "const u_int8_t *data" "size_t len" "char *buf"
.Sh DESCRIPTION


+ 3
- 3
src/lib/libc/hash/sha1.3 View File

@ -1,4 +1,4 @@
.\" $OpenBSD: sha1.3,v 1.33 2004/05/16 18:29:09 otto Exp $
.\" $OpenBSD: sha1.3,v 1.34 2004/06/22 01:57:29 jfb Exp $
.\"
.\" Copyright (c) 1997, 2004 Todd C. Miller <Todd.Miller@courtesan.com>
.\"
@ -47,9 +47,9 @@
.Ft "char *"
.Fn SHA1End "SHA1_CTX *context" "char *buf"
.Ft "char *"
.Fn SHA1File "char *filename" "char *buf"
.Fn SHA1File "const char *filename" "char *buf"
.Ft "char *"
.Fn SHA1FileChunk "char *filename" "char *buf" "off_t offset" "off_t length"
.Fn SHA1FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
.Ft "char *"
.Fn SHA1Data "const u_int8_t *data" "size_t len" "char *buf"
.Sh DESCRIPTION


+ 3
- 3
src/lib/libc/hash/sha2.3 View File

@ -1,4 +1,4 @@
.\" $OpenBSD: sha2.3,v 1.10 2004/05/16 18:29:09 otto Exp $
.\" $OpenBSD: sha2.3,v 1.11 2004/06/22 01:57:29 jfb Exp $
.\"
.\" Copyright (c) 2003, 2004 Todd C. Miller <Todd.Miller@courtesan.com>
.\"
@ -50,9 +50,9 @@
.Ft "char *"
.Fn SHA256_End "SHA256_CTX *context" "char *buf"
.Ft "char *"
.Fn SHA256_File "char *filename" "char *buf"
.Fn SHA256_File "const char *filename" "char *buf"
.Ft "char *"
.Fn SHA256_FileChunk "char *filename" "char *buf" "off_t offset" "off_t length"
.Fn SHA256_FileChunk "const char *filename" "char *buf" "off_t offset" "off_t length"
.Ft "char *"
.Fn SHA256_Data "u_int8_t *data" "size_t len" "char *buf"
.Ft void


Loading…
Cancel
Save