summaryrefslogtreecommitdiffstats
path: root/src/crypto/rand/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/rand/internal.h')
-rw-r--r--src/crypto/rand/internal.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/crypto/rand/internal.h b/src/crypto/rand/internal.h
index f35abbb..5e6ea11 100644
--- a/src/crypto/rand/internal.h
+++ b/src/crypto/rand/internal.h
@@ -24,9 +24,13 @@ extern "C" {
* system. */
void CRYPTO_sysrand(uint8_t *buf, size_t len);
-/* CRYPTO_hwrand fills |len| bytes at |buf| with entropy from the hardware. It
- * returns one on success or zero on hardware failure or if hardware support is
- * unavailable. */
+/* CRYPTO_have_hwrand returns one iff |CRYPTO_hwrand| can be called to generate
+ * hardware entropy. */
+int CRYPTO_have_hwrand(void);
+
+/* CRYPTO_hwrand fills |len| bytes at |buf| with entropy from the hardware.
+ * This function can only be called if |CRYPTO_have_hwrand| returns one.
+ * It returns one on success or zero on hardware failure. */
int CRYPTO_hwrand(uint8_t *buf, size_t len);