2 releases
Uses new Rust 2024
| 0.1.2 | Jun 1, 2025 |
|---|---|
| 0.1.1 | Jun 1, 2025 |
| 0.1.0 |
|
#754 in Cryptography
49 downloads per month
8KB
89 lines
prisma-decrypt
A fast cli tool that decrypts data encrypted in your database by the prisma middleware prisma-field-encryption
Installation
brew tap sagefarrenholz/prisma-decrypt
brew install prisma-decrypt
or via cargo:
cargo install prisma-decrypt
Usage
Using PRISMA_FIELD_ENCRYPTION_KEY environment variable:
prisma-decrypt <ENCRYPTED_DATA>
Manually specifying decryption key:
prisma-decrypt --prisma-key <PRISMA_FIELD_ENCRYPTION_KEY> <ENCRYPTED_DATA>
Encoding Output
You can also specify the encoding output (by default utf-8):
prisma-decrypt --encoding hex <ENCRYPTED_DATA>
prisma-decrypt --encoding base64 <ENCRYPTED_DATA>
Notes
Alternatively, you could use cloak https://www.npmjs.com/package/@47ng/cloak
(prisma-field-encryption uses this under the hood), but I built this to be a
bit faster and give more flexibility
Dependencies
~2.3–3MB
~59K SLoC