1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Const-correctness in struct ssh_hash.

The 'bytes' function should take a const void * as input, not a void *.
This commit is contained in:
Simon Tatham 2015-05-15 10:12:05 +01:00
parent 8423f79e32
commit 79fe96155a
4 changed files with 4 additions and 4 deletions

2
ssh.h
View File

@ -335,7 +335,7 @@ struct ssh_mac {
struct ssh_hash {
void *(*init)(void); /* also allocates context */
void (*bytes)(void *, void *, int);
void (*bytes)(void *, const void *, int);
void (*final)(void *, unsigned char *); /* also frees context */
int hlen; /* output length in bytes */
char *text_name;

View File

@ -200,7 +200,7 @@ static void *sha256_init(void)
return s;
}
static void sha256_bytes(void *handle, void *p, int len)
static void sha256_bytes(void *handle, const void *p, int len)
{
SHA256_State *s = handle;

View File

@ -331,7 +331,7 @@ static void *sha512_init(void)
return s;
}
static void sha512_bytes(void *handle, void *p, int len)
static void sha512_bytes(void *handle, const void *p, int len)
{
SHA512_State *s = handle;

View File

@ -230,7 +230,7 @@ static void *sha1_init(void)
return s;
}
static void sha1_bytes(void *handle, void *p, int len)
static void sha1_bytes(void *handle, const void *p, int len)
{
SHA_State *s = handle;