Package encrypted provides a simple, secure system for encrypting data symmetrically with a passphrase.
It uses scrypt derive a key from the passphrase and the NaCl secret box cipher for authenticated encryption.
Decrypt takes a JSON-encoded ciphertext object encrypted using Encrypt and tries to decrypt it using passphrase. If successful, it returns the plaintext.
Encrypt takes a passphrase and plaintext, and returns a JSON object containing ciphertext and the details necessary to decrypt it.
Marshal encrypts the JSON encoding of v using passphrase.