yajsapi - JavaScript high-level API
Yagna Contributor Guide

Class: CryptoCtx

yajsapi / Exports / crypto / CryptoCtx

Class: CryptoCtx

crypto.CryptoCtx

Hierarchy

  • CryptoCtx

Table of contents

Constructors

Properties

Methods

Constructors

constructor

Parameters:

Name

Type

priv_key

PrivateKey

ephem_key

Buffer

Returns: CryptoCtx

Defined in: yajsapi/crypto.ts:77

Properties

ephem_key

ephem_key: Buffer

Defined in: yajsapi/crypto.ts:71

priv_key

priv_key: PrivateKey

Defined in: yajsapi/crypto.ts:70

Methods

decrypt

decrypt(data: Buffer): Buffer

Parameters:

Name

Type

data

Buffer

Returns: Buffer

Defined in: yajsapi/crypto.ts:106

encrypt

encrypt(data: Buffer): Buffer

Parameters:

Name

Type

data

Buffer

Returns: Buffer

Defined in: yajsapi/crypto.ts:84

from

Staticfrom(pub_key: PublicKey, priv_key?: PrivateKey): Promise<CryptoCtx>

Parameters:

Name

Type

pub_key

PublicKey

priv_key?

PrivateKey

Returns: Promise<CryptoCtx>

Defined in: yajsapi/crypto.ts:73