A simple API to create n-times viewable secrets.
Secrets is an API that allows you to create n-time viewable secrets. You can use it to share passwords and other sensitive information which should only be seen by specific people for a specified time and for a specified number of times.
It is built with Nest.js and TypeScript and you can host it on your own server. Secrets uses a MySQL to store the secrets.
You can try it out here - https://secrets.iamdani.sh.
Secrets encrypts all the messages before storing them in the database. The encryption algorithm used is AES-192-CBC. The passphrase serves as a key and a random 16-byte buffer is used as the initialization vector (IV).
The passphrase is stored as a SHA-1 hash salted with random 16 bytes. Salt and IV are also stored in the database for decryption purposes.
GET /secret/all
GET /secret/view/[secret_uri]
<secret_uri>
Unique slug for the secret (upon generating it)
GET /secret/view/ZRK9Q9n
POST /secret/create
{
"validFor": int, // secret validity in hours
"viewsAllowed": int, // number of times a secret can be viewed/decrypted
"passphrase": string, // secret passphrase to decrypt the message
"secret": string, // message to be encrypted
}
{
"validFor": 24,
"viewsAllowed": 1,
"passphrase": "super_secret",
"secret": "Hello world!"
}
GET /secret/shred/<secret_id>
<secret_id>
Secret ID
- Author - Danish Shakeel
- Website - https://iamdani.sh | https://danishshakeel.me
Secrets API is Apache-2.0 licensed.