summaryrefslogtreecommitdiff
path: root/sys/dev/random/hash.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2014-11-10 09:44:38 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2014-11-10 09:44:38 +0000
commit133cdd9e13bf502041339cf2561c224d3e9c609a (patch)
tree23cd106f8b3ce857a01712210f815b716473d3b4 /sys/dev/random/hash.c
parent0506889c15d39b8edb35bf871ef1f35112a13e1e (diff)
Notes
Diffstat (limited to 'sys/dev/random/hash.c')
-rw-r--r--sys/dev/random/hash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/random/hash.c b/sys/dev/random/hash.c
index 7deee8781917..844e423422a3 100644
--- a/sys/dev/random/hash.c
+++ b/sys/dev/random/hash.c
@@ -60,7 +60,7 @@ randomdev_hash_init(struct randomdev_hash *context)
/* Iterate the hash */
void
-randomdev_hash_iterate(struct randomdev_hash *context, void *data, size_t size)
+randomdev_hash_iterate(struct randomdev_hash *context, const void *data, size_t size)
{
SHA256_Update(&context->sha, data, size);
@@ -81,7 +81,7 @@ randomdev_hash_finish(struct randomdev_hash *context, void *buf)
* data. Use CBC mode for better avalanche.
*/
void
-randomdev_encrypt_init(struct randomdev_key *context, void *data)
+randomdev_encrypt_init(struct randomdev_key *context, const void *data)
{
rijndael_cipherInit(&context->cipher, MODE_CBC, NULL);
@@ -93,7 +93,7 @@ randomdev_encrypt_init(struct randomdev_key *context, void *data)
* a multiple of BLOCKSIZE.
*/
void
-randomdev_encrypt(struct randomdev_key *context, void *d_in, void *d_out, u_int length)
+randomdev_encrypt(struct randomdev_key *context, const void *d_in, void *d_out, u_int length)
{
rijndael_blockEncrypt(&context->cipher, &context->key, d_in, length*8, d_out);