Skip to main content

Encryption

@rotorsoft/act-root


@rotorsoft/act-root / act-crypto/src / Encryption

Type Alias: Encryption

Encryption = object

Defined in: libs/act-crypto/src/envelope.ts:43

Operator-supplied configuration for envelope encryption. Adapters accept a value of this shape under whatever option name fits their surface (e.g. pii_encryption on PostgresStore).

Propertiesโ€‹

algorithmโ€‹

readonly algorithm: Algorithm

Defined in: libs/act-crypto/src/envelope.ts:53

Cipher selection. Locked to aes-256-gcm for now.


keyProviderโ€‹

readonly keyProvider: () => Buffer | Promise<Buffer>

Defined in: libs/act-crypto/src/envelope.ts:51

Returns the symmetric key used for both encrypt and decrypt. makeKeyResolver calls this once on first use and caches the result for the resolver's lifetime โ€” operators who need rotation restart the adapter with a new provider. Must return a 32-byte Buffer (256 bits) for AES-256-GCM.

Returnsโ€‹

Buffer | Promise<Buffer>