Function random [src]
Return a random scalar < L.
Prototype
pub fn random() Scalar
Source
pub fn random() Scalar {
var s: [64]u8 = undefined;
while (true) {
crypto.random.bytes(&s);
const n = Scalar.fromBytes64(s, .little);
if (!n.isZero()) {
return n;
}
}
}