mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-19 04:25:03 +00:00
add extra note on security
This commit is contained in:
parent
0c13564ad7
commit
90636d14c8
1 changed files with 3 additions and 0 deletions
|
@ -442,6 +442,9 @@ test "increfC, static data" {
|
|||
// This avoids all roc Dicts using a known seed and being trivial to DOS.
|
||||
// Still not as secure as true random, but a lot better.
|
||||
// This value must not change between calls unless Dict is changed to store the seed on creation.
|
||||
// Note: On esstentially all OSes, this will be affected by ASLR and different each run.
|
||||
// In wasm, the value will be constant to the build as a whole.
|
||||
// Either way, it can not be know by an attacker unless they get access to the executable.
|
||||
pub fn dictPseudoSeed() callconv(.C) u64 {
|
||||
return @intCast(u64, @ptrToInt(dictPseudoSeed));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue