Skip to content

buildFullOptions

buildFullOptions(partialOptions): EncryptOptions

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

Builds a full options object from the given options partial. Populates omitted properties with defaults.

If any of encAlg, hashAlg, iterations, or kdf are not provided, its value from DEFAULTS will be used.

If iv is not provided, 12 random bytes will be generated.

If salt is not provided, 16 random bytes will be generated.

crypto.getRandomValues is used to generate random bytes.

Partial<EncryptOptions>

An options partial.

EncryptOptions

A full EncryptOptions object.