Skip to main content

seed

Function seed 

Source
pub fn seed() -> u64
Available on crate feature rand only.
Expand description

混合多熵源生成 64 位种子。

将 probe 时间戳、reg_sig 寄存器指纹与栈内存抖动混合搅拌, 适用于 next 的定期重播种。开销高于 next,勿用于热路径。

§Feature Requirement

需要启用 "rand" 特性。

§Examples

use lib_unknown::rand::seed;

let s1 = seed();
let s2 = seed();
assert_ne!(s1, s2);