The 'bytes' function should take a const void * as input, not a void *.
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;
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;
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;
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;