Home Reference Source
import {LocalKeyEncapsulationService} from 'neo4j-driver-core/lib/encryption/local-key-encapsulation.js'
public class | source

LocalKeyEncapsulationService

this class is experimental. Part of the Client-Side Encrytion preview feature

An implementation of KeyEncapsulationService that uses a local, 256-bit, AES-GCM Key Encryption Key (KEK) to encrypt keys.

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

decapsulate(encapsulation: Int8Array, metadata: KeyEncapsulationOptions): Promise<Uint8Array>

this method is experimental. Part of the Client-Side Encrytion preview feature

Decapsulates encapsulated bytes with the local KEK.

public

encapsulate(options: KeyEncapsulationOptions): Promise<EncapsulationResult>

this method is experimental. Part of the Client-Side Encrytion preview feature

Creates a new key, encapsulates it with the local KEK and returns the result.

Public Constructors

public constructor() source

Public Methods

public decapsulate(encapsulation: Int8Array, metadata: KeyEncapsulationOptions): Promise<Uint8Array> source

this method is experimental. Part of the Client-Side Encrytion preview feature

Decapsulates encapsulated bytes with the local KEK.

Params:

NameTypeAttributeDescription
encapsulation Int8Array

the encapsulated byte}

metadata KeyEncapsulationOptions

the key metadata

Return:

Promise<Uint8Array>

a promise that resolves to the decapsulated key

public encapsulate(options: KeyEncapsulationOptions): Promise<EncapsulationResult> source

this method is experimental. Part of the Client-Side Encrytion preview feature

Creates a new key, encapsulates it with the local KEK and returns the result.

Params:

NameTypeAttributeDescription
options KeyEncapsulationOptions

the encapsulation options, depends on the implementation

Return:

Promise<EncapsulationResult>

a promise that resolves to the encapsulation result