Skip to main content

@bloock/sdk / EncryptionClient

Class: EncryptionClient

Represents a client for interacting with the Bloock Encryption service.

Table of contents​

Constructors​

Properties​

Methods​

Constructors​

constructor​

• new EncryptionClient(configData?): EncryptionClient

Creates a new instance of the EncryptionClient with default configuration.

Parameters​

NameType
configData?ConfigData

Returns​

EncryptionClient

Defined in​

client/encryption.ts:26

Properties​

bridge​

• Private bridge: BloockBridge

Defined in​

client/encryption.ts:19


configData​

• Private configData: ConfigData

Defined in​

client/encryption.ts:20

Methods​

decrypt​

▸ decrypt(record, decrypter): Promise<Record>

Decrypts a Bloock record using the specified decrypter.

Parameters​

NameType
recordRecord
decrypterEncrypter

Returns​

Promise<Record>

Defined in​

client/encryption.ts:83


encrypt​

▸ encrypt(record, encrypter): Promise<Record>

Encrypts a Bloock record using the specified encrypter.

Parameters​

NameType
recordRecord
encrypterEncrypter

Returns​

Promise<Record>

Defined in​

client/encryption.ts:59


generateRsaKeyPair​

▸ generateRsaKeyPair(): Promise<KeyPair>

GenerateRsaKeyPair generates an RSA key pair for encryption.

Returns​

Promise<KeyPair>

An object containing both the public and the private key

Deprecated

Will be deleted in future versions. Use KeyClient.newLocalKey function instead.

Defined in​

client/encryption.ts:36


getEncryptionAlg​

▸ getEncryptionAlg(record): Promise<EncryptionAlg>

Gets the encryption algorithm used for a Bloock record.

Parameters​

NameType
recordRecord

Returns​

Promise<EncryptionAlg>

Defined in​

client/encryption.ts:106