Function random [src]

Return a random scalar < L.

Prototype

pub fn random() Scalar

Source

pub fn random() Scalar { var s: [48]u8 = undefined; while (true) { crypto.random.bytes(&s); const n = Scalar.fromBytes48(s, .little); if (!n.isZero()) { return n; } } }