|
@@ -461,4 +461,15 @@ int __must_check crypto_mod_exp(const u8 *base, size_t base_len,
|
|
|
int rc4_skip(const u8 *key, size_t keylen, size_t skip,
|
|
|
u8 *data, size_t data_len);
|
|
|
|
|
|
+/**
|
|
|
+ * crypto_get_random - Generate cryptographically strong pseudy-random bytes
|
|
|
+ * @buf: Buffer for data
|
|
|
+ * @len: Number of bytes to generate
|
|
|
+ * Returns: 0 on success, -1 on failure
|
|
|
+ *
|
|
|
+ * If the PRNG does not have enough entropy to ensure unpredictable byte
|
|
|
+ * sequence, this functions must return -1.
|
|
|
+ */
|
|
|
+int crypto_get_random(void *buf, size_t len);
|
|
|
+
|
|
|
#endif /* CRYPTO_H */
|