Skip to content

EncryptOptions

Defined in: astrobase/src/encrypt/encrypt.ts:5

Options for encrypt API.

encAlg: "AES-GCM"

Defined in: astrobase/src/encrypt/encrypt.ts:7

The encryption algorithm.


hashAlg: "SHA-256"

Defined in: astrobase/src/encrypt/encrypt.ts:10

The hashing algorithm used for key derivation.


iterations: number

Defined in: astrobase/src/encrypt/encrypt.ts:13

The number of iterations for key derivation.


kdf: "PBKDF2"

Defined in: astrobase/src/encrypt/encrypt.ts:19

The key derivation function identifier.


nonce: Uint8Array

Defined in: astrobase/src/encrypt/encrypt.ts:16

Nonce or initialization vector.


optional passphrase: string

Defined in: astrobase/src/encrypt/encrypt.ts:22

A passphrase to use for key derivation.


optional pubKey: Uint8Array<ArrayBufferLike>

Defined in: astrobase/src/encrypt/encrypt.ts:30

The public key of the key pair to use for key derivation.

Note that the public key is merely used to lookup the corresponding private key via the keyring. A symmetric key is ultimately derived from the private key.


salt: Uint8Array

Defined in: astrobase/src/encrypt/encrypt.ts:33

The key derivation salt.