diff --git a/dbrandom.c b/dbrandom.c
index cf280f438f3fb1577b677e02846085de31b416de..02e78036abcc53f1bfb13cd82ca445fbd595c86c 100644
--- a/dbrandom.c
+++ b/dbrandom.c
@@ -141,7 +141,7 @@ out:
 	return ret;
 }
 
-void addrandom(char * buf, unsigned int len)
+void addrandom(unsigned char * buf, unsigned int len)
 {
 	hash_state hs;
 
diff --git a/dbrandom.h b/dbrandom.h
index 3434f69fef02d92a7de1980e3901cf49f2da4fbc..6e262f384153c7dc4d9647b442ecdded9b96ecf1 100644
--- a/dbrandom.h
+++ b/dbrandom.h
@@ -29,7 +29,7 @@
 
 void seedrandom();
 void genrandom(unsigned char* buf, unsigned int len);
-void addrandom(char * buf, unsigned int len);
+void addrandom(unsigned char * buf, unsigned int len);
 void gen_random_mpint(mp_int *max, mp_int *rand);
 
 #endif /* DROPBEAR_RANDOM_H_ */