aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorYawning Angel <yawning@schwanenlied.me>2024-06-22 14:52:43 +0900
committerYawning Angel <yawning@schwanenlied.me>2024-07-16 01:29:43 +0900
commitc9c0b9ea7b6ca2fcffa9b4bd69c0db6975caeb82 (patch)
treea05a0ca320efc23972ea6ed9aca34f3bf012ee3a /core
parent390cd3c30d9fe451312f5af26cfb845d4d0a83f9 (diff)
core/crypto: Fix/add some documentation (NFC)
Diffstat (limited to 'core')
-rw-r--r--core/crypto/aes/aes.odin1
-rw-r--r--core/crypto/crypto.odin6
2 files changed, 5 insertions, 2 deletions
diff --git a/core/crypto/aes/aes.odin b/core/crypto/aes/aes.odin
index e895c5fe0..ef305fd21 100644
--- a/core/crypto/aes/aes.odin
+++ b/core/crypto/aes/aes.odin
@@ -6,7 +6,6 @@ See:
- https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38a.pdf
- https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
*/
-
package aes
import "core:crypto/_aes"
diff --git a/core/crypto/crypto.odin b/core/crypto/crypto.odin
index f83d20dd7..323cc45d6 100644
--- a/core/crypto/crypto.odin
+++ b/core/crypto/crypto.odin
@@ -60,7 +60,11 @@ rand_bytes :: proc (dst: []byte) {
_rand_bytes(dst)
}
-
+// random_generator returns a `runtime.Random_Generator` backed by the
+// system entropy source.
+//
+// Support for the system entropy source can be checked with the
+// `HAS_RAND_BYTES` boolean constant.
random_generator :: proc() -> runtime.Random_Generator {
return {
procedure = proc(data: rawptr, mode: runtime.Random_Generator_Mode, p: []byte) {