Skip to main content

Encryption

o1js / Modules / Encryption

Namespace: Encryption

Table of contents

Functions

Functions

decrypt

decrypt(«destructured», privateKey): Field[]

Decrypts a CipherText using a PrivateKey.^

Parameters

NameType
«destructured»CipherText
privateKeyPrivateKey

Returns

Field[]

Defined in

lib/encryption.ts:45


encrypt

encrypt(message, otherPublicKey): Object

Public Key Encryption, using a given array of Field elements and encrypts it using a PublicKey.

Parameters

NameType
messageField[]
otherPublicKeyPublicKey

Returns

Object

NameType
cipherTextField[]
publicKeyGroup

Defined in

lib/encryption.ts:16