Skip to content
TypeWire

@tahanabavi/typefetch-encryption

v0.1.0

Field-level request/response encryption middleware for TypeFetch contracts (AES, DES, RSA, Base64, custom).

Options

OptionDefaultMeaning
keyProvider—Returns the symmetric key or RSA key pair. Sync or async.
customHandlers—Your own encrypt/decrypt for method: "Custom".
failClosedtrueThrow when encryption fails rather than sending plaintext.

failClosed defaults to true on purpose: a middleware that silently falls back to plaintext when a key is missing is a middleware that will one day ship an SSN in the clear.