Debian Codegraph @

vendor/wit-component/tests/interfaces/wasi-http/deps/random/insecure.wit

raw
1 package wasi:[email protected];
2 /// The insecure interface for insecure pseudo-random numbers.
3 ///
4 /// It is intended to be portable at least between Unix-family platforms and
5 /// Windows.
6 interface insecure {
7 /// Return `len` insecure pseudo-random bytes.
8 ///
9 /// This function is not cryptographically secure. Do not use it for
10 /// anything related to security.
11 ///
12 /// There are no requirements on the values of the returned bytes, however
13 /// implementations are encouraged to return evenly distributed values with
14 /// a long period.
15 get-insecure-random-bytes: func(len: u64) -> list<u8>;
16
17 /// Return an insecure pseudo-random `u64` value.
18 ///
19 /// This function returns the same type of pseudo-random data as
20 /// `get-insecure-random-bytes`, represented as a `u64`.
21 get-insecure-random-u64: func() -> u64;
22 }