Commit Graph

2 Commits

Author SHA1 Message Date
Terry Geng
e90eb8c4cd
src: Made CryptState an abstract class, in order to support multiple crypto types in the future. Moved all crypto-related files into src/crypto. 2020-06-06 20:37:59 +08:00
Mikkel Krautz
aa25435a7b CryptographicRandom: new class for acquiring random data for cryptographic purposes.
The class implements an API similar to OpenBSD's arc4random:

 - A way to get a random uint32_t. (arc4random)
 - A way to get a random uint32_t with an upper bound. (arc4random_uniform)
 - A way to fill a buffer with random data. (arc4random_buf)
2017-03-01 23:29:07 +01:00