4 ms·
If anyone is curious like I was, here's a quick review of what the linked code does: - Reads plaintext input from stdin - Symmetrically encrypts the plaintext
by bndw 5y ago
If anyone is curious like I was, here's a quick review of what the linked code does:
- Reads plaintext input from stdin
- Symmetrically encrypts the plaintext using a 32-byte [cryptographically] random generated key (AES-256 GCM)
- POSTs the ciphertext and expiry (default 24h) to https://api.ots.sniptt.com/secrets https://api.ots.sniptt.com/secrets
- The server responds with a URL to view the secret via a response header
- Query string "?ref=cli&v=<version>" are appended to the secret URL
- The decryption key is base64 encoded and appended to the secret URL as a Fragment, "#<key>"
- The secret URL is printed to stdout
- slavomirvojacek 5y agoHi, just for completeness - the decryption key is added to the secret URL as a fragment in the penultimate step.
- bndw 5y agoThanks for the correction, updated.