mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-26 01:32:25 +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:
parent
8423f79e32
commit
79fe96155a
2
ssh.h
2
ssh.h
@ -335,7 +335,7 @@ struct ssh_mac {
|
|||||||
|
|
||||||
struct ssh_hash {
|
struct ssh_hash {
|
||||||
void *(*init)(void); /* also allocates context */
|
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 */
|
void (*final)(void *, unsigned char *); /* also frees context */
|
||||||
int hlen; /* output length in bytes */
|
int hlen; /* output length in bytes */
|
||||||
char *text_name;
|
char *text_name;
|
||||||
|
@ -200,7 +200,7 @@ static void *sha256_init(void)
|
|||||||
return s;
|
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;
|
SHA256_State *s = handle;
|
||||||
|
|
||||||
|
@ -331,7 +331,7 @@ static void *sha512_init(void)
|
|||||||
return s;
|
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;
|
SHA512_State *s = handle;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user