yajsapi - JavaScript high-level API
Yagna Contributor Guide

Class: CryptoCtx

yajsapi / Exports / crypto / CryptoCtx

Class: CryptoCtx

crypto.CryptoCtx

Table of contents

Constructors

Properties

Methods

Constructors

constructor

Private new CryptoCtx(priv_key, ephem_key)

Parameters

Name

Type

priv_key

PrivateKey

ephem_key

Buffer

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

Parameters

Name

Type

data

Buffer

Returns

Buffer

Defined in

yajsapi/crypto.ts:106

encrypt

encrypt(data): Buffer

Parameters

Name

Type

data

Buffer

Returns

Buffer

Defined in

yajsapi/crypto.ts:84

from

Static from(pub_key, priv_key?): Promise<CryptoCtx>

Parameters

Name

Type

pub_key

PublicKey

priv_key?

PrivateKey

Returns

Promise<CryptoCtx>

Defined in

yajsapi/crypto.ts:73