Debian Codegraph @

.cargo/vendor/wasip2/wit/deps/random/insecure-seed.wit

raw
1 package wasi:[email protected];
2 /// The insecure-seed interface for seeding hash-map DoS resistance.
3 ///
4 /// It is intended to be portable at least between Unix-family platforms and
5 /// Windows.
6 @since(version = 0.2.0)
7 interface insecure-seed {
8 /// Return a 128-bit value that may contain a pseudo-random value.
9 ///
10 /// The returned value is not required to be computed from a CSPRNG, and may
11 /// even be entirely deterministic. Host implementations are encouraged to
12 /// provide pseudo-random values to any program exposed to
13 /// attacker-controlled content, to enable DoS protection built into many
14 /// languages' hash-map implementations.
15 ///
16 /// This function is intended to only be called once, by a source language
17 /// to initialize Denial Of Service (DoS) protection in its hash-map
18 /// implementation.
19 ///
20 /// # Expected future evolution
21 ///
22 /// This will likely be changed to a value import, to prevent it from being
23 /// called multiple times and potentially used for purposes other than DoS
24 /// protection.
25 @since(version = 0.2.0)
26 insecure-seed: func() -> tuple<u64, u64>;
27 }