Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Examples

Runnable example programs for @ubgo/crypt. Each subdirectory has a main.ts runnable with tsx or node --import tsx.

Example Demonstrates
encrypt-field/ Encrypt-at-rest pattern for a database column.
sign-webhook/ Sign and verify webhooks with HMAC-SHA256.
random-token/ API keys, magic-link tokens, log correlation IDs.
seal-with-aad/ Bind ciphertext to a user/tenant via AAD.
sealer/ Application-wide bound-key Sealer.
migrate-cbc-to-gcm/ One-shot migration from legacy AES-CBC to AEAD.

Running

pnpm install -g tsx
tsx examples/encrypt-field/main.ts

Or from the repo root with pnpm:

pnpm exec tsx examples/encrypt-field/main.ts