Skip to main content

From Plaintext (Trivial Encryption)

Convert plaintext values to encrypted types. An optional securityZone parameter isolates encrypted computations.

asEbool

asEuint8 / asEuint16 / asEuint32 / asEuint64 / asEuint128

asEaddress


From encrypted inputs

Convert client-side encrypted inputs (received as function parameters) into encrypted types. Each input arrives as an externalE* handle plus a bytes proof that authenticates it.
All input types follow the same pattern:
One proof covers every encrypted input in a call. When a function receives more than one, convert them together with the plural form (FHE.asEuint32s(handles, inputProof)) instead of calling the single form per value.

Between encrypted types

Cast between ebool, the euint types, and eaddress. Every direction is supported except into eaddress: there is no cast from another encrypted type into an address. Create an eaddress from a plaintext address or an encrypted input instead.