Releases: rojohyd/cryptpdf
Release list
v0.1.1 — Initial Release
Minimal PDF encrypt/decrypt library with AES-256 (PDF Rev 5).
Features
encryptPDF — Encrypt any PDF buffer with user and/or owner password
decryptPDF — Decrypt with either password
AES-256-CBC per stream and string with random IVs
Spec-compliant Rev 5 security handler (Adobe Supplement to ISO 32000)
SHA-256 key derivation with embedded salts in U/O
Crypt filters (AESV3), Perms validation block
Zero external crypto dependencies — uses Web Crypto (Node 18+)
Ships ESM + CJS + TypeScript declarations
Peer dependency: pdf-lib
Usage
import { encryptPDF, decryptPDF } from 'cryptpdf';
const encrypted = await encryptPDF(pdfBytes, 'user-pass', 'owner-pass');
const decrypted = await decryptPDF(encrypted, 'user-pass');
v0.1.0 — Initial Release
Minimal PDF encrypt/decrypt library with AES-256 (PDF Rev 5).
Features
- encryptPDF — Encrypt any PDF buffer with user and/or owner password
- decryptPDF — Decrypt with either password
- AES-256-CBC per stream and string with random IVs
- Spec-compliant Rev 5 security handler (Adobe Supplement to ISO 32000)
- SHA-256 key derivation with embedded salts in U/O
- Crypt filters (AESV3), Perms validation block
- Zero external crypto dependencies — uses Web Crypto (Node 18+)
- Ships ESM + CJS + TypeScript declarations
- Peer dependency: pdf-lib
Usage
import { encryptPDF, decryptPDF } from 'cryptpdf';
const encrypted = await encryptPDF(pdfBytes, 'user-pass', 'owner-pass');
const decrypted = await decryptPDF(encrypted, 'user-pass');