Ever needed to secure your files in a fast and simple way ? Then look no further because Safe is the simplest encryption utility that you'll ever need. Safe features industry strength AES256 GCM encryption while being very easy to use and very fast, which makes it perfect for daily use. You can now secure your files, e-mail attachments or messages with ease without having to worry about prying eyes.
$ deno install
$ deno run compile
For macOS
$ deno run compile:mac
For Linux
$ deno run compile:linux
For Windows
$ deno run compile:windows
$ deno ./src/safe.ts
On macOS and Linux
$ ./build/[mac,linux]-[arch]/safe
On Windows
C:\Path_to_Safe/build/win/safe.exe
encrypt a single file
$ safe encrypt /home/downloads/secret.pdf /home/downloads/
encrypt a folder and all files inside a folder recursively
$ safe encrypt /home/downloads/secret-folder /home/downloads/
decrypt
$ safe decrypt /home/downloads/secret.safe /home/downloads
list encrypted files and show encryption info
$ safe list /home/downloads/secret.safe
The JSON payload consists of an object containing all the encryption information: file names, relative paths, sizes, SHA1 hashes, encrypted chunks info, encryption date
{
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "Safe payload Schema",
"type": "object",
"required": ["files", "totalSize", "date"],
"properties": {
"files": {
"type": "array",
"items": {
"type": "object",
"required": ["path", "hash", "size", "chunks"],
"properties": {
"path": { "type": "string" },
"hash": { "type": "string" },
"size": { "type": "number" },
"chunks": {
"type": "array",
"items": { "type": "number" }
}
}
}
},
"totalSize": { "type": "number" },
"date": {
"type": "string",
"format": "date-time"
}
}
}
This represents the size of the encrypted payload. In order to read the correct amount of data for the payload we need to know the exact size of the encrypted payload data.