Debian Codegraph @

.cargo/vendor/wasip2/wit/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 @since(version = 0.2.0)
7 interface insecure {
8 /// Return `len` insecure pseudo-random bytes.
9 ///
10 /// This function is not cryptographically secure. Do not use it for
11 /// anything related to security.
12 ///
13 /// There are no requirements on the values of the returned bytes, however
14 /// implementations are encouraged to return evenly distributed values with
15 /// a long period.
16 @since(version = 0.2.0)
17 get-insecure-random-bytes: func(len: u64) -> list<u8>;
18
19 /// Return an insecure pseudo-random `u64` value.
20 ///
21 /// This function returns the same type of pseudo-random data as
22 /// `get-insecure-random-bytes`, represented as a `u64`.
23 @since(version = 0.2.0)
24 get-insecure-random-u64: func() -> u64;
25 }