[−][src]Function pseudo_encrypt::pseudo_encrypt
pub fn pseudo_encrypt<A>(a: A) -> A where
A: Shl<usize, Output = A> + Shr<usize, Output = A> + Add<Output = A> + Mul<Output = A> + Rem<Output = A> + BitAnd<Output = A> + BitXor<Output = A> + PseudoEncryptable + From<<A as PseudoEncryptable>::HalfBitType>,
Function that acts as a pseudo-random generator of unique values. It produces an integer output that is uniquely associated to its integer input (by a mathematical permutation), but looks random at the same time, with zero collision
Example
let r = pseudo_encrypt(u128::MAX); assert_eq!(340282366920938384363736019365210866432, r);