minca
ApiCoreFunctions

Function: createEncryptedAdapter()

function createEncryptedAdapter(
   inner, 
   key, 
   options?
): StorageAdapter;

Defined in: packages/core/src/storage/encrypted-adapter.ts:44

Wraps an adapter so values under the sealed prefixes are encrypted on the way in and opened on the way out. Each is bound to its storage key, so they can't be swapped between entries, and one that does not open is refused: otherwise anyone who can write the folder could plant a space in the clear.

Parameters

ParameterTypeDescription
innerStorageAdapter-
keyCryptoKeyThe account's local key (deriveLocalKey)
options?EncryptedAdapterOptions-

Returns

StorageAdapter

On this page