Expand description
QR code generation for recovery secrets.
Generates high-entropy recovery secrets and encodes them as QR codes for out-of-band archive unlock. The recovery secret provides an alternative to password-based decryption using HKDF-SHA256 (fast for high-entropy inputs).
§Output Files (private/)
private/
├── recovery-secret.txt # Human-readable secret with instructions
├── qr-code.png # QR code image for mobile scanning
└── qr-code.svg # Vector QR code for print§Security
- Recovery secret is 256-bit (32 bytes) for maximum security
- Encoded as URL-safe base64 without padding
- Creates a recovery key slot using HKDF-SHA256
- NEVER deploy private/ directory with public site
Structs§
- QrGenerator
- QR code generator (legacy struct interface for backward compatibility)
- Recovery
Artifacts - Generated recovery artifacts ready for writing to disk.
- Recovery
Secret - Recovery secret for archive unlock.
Functions§
- generate_
qr_ png - Generate a QR code as PNG bytes.
- generate_
qr_ svg - Generate a QR code as SVG string.