Skip to main content

Overview

The FHE library provides cryptographically secure random number generation that produces encrypted random values. The values are generated in encrypted form—no one can see the plaintext until it is explicitly decrypted.

Random Functions

FunctionReturn Type
FHE.randomEuint8()euint8
FHE.randomEuint16()euint16
FHE.randomEuint32()euint32
FHE.randomEuint64()euint64
FHE.randomEuint128()euint128

Usage

Call FHE.allowThis() on random values if you need to store or use them later in your contract.