Notes on --encrypt and --decrypt

This commit is contained in:
Manuel Ebert 2012-04-17 21:54:08 +02:00
parent 9a2ea77086
commit 87d4858abd

View file

@ -132,18 +132,28 @@ It's just a regular `json` file:
Can do: Can do:
jrnl -json jrnl --json
Why not create a beautiful [timeline](http://timeline.verite.co/) of your journal? Why not create a beautiful [timeline](http://timeline.verite.co/) of your journal?
### Markdown export ### Markdown export
jrnl -markdown jrnl --markdown
Markdown is a simple markup language that is human readable and can be used to be rendered to other formats (html, pdf). This README for example is formatted in markdown and github makes it look nice. Markdown is a simple markup language that is human readable and can be used to be rendered to other formats (html, pdf). This README for example is formatted in markdown and github makes it look nice.
### Encryption ### Encryption
You can encrypt your existing journal file or change its password using
jrnl --encrypt
If it is already encrypted, you will first be asked for the current password. You can then enter a new password and your plain journal will replaced by the encrypted file. Conversely,
jrnl --decrypt
will replace your encrypted journal file by a Journal in plain text.
Should you ever want to decrypt your journal manually, you can do so with any program that supports the AES algorithm. The key used for encryption is the SHA-256-hash of your password, and the IV (initialisation vector) is stored in the first 16 bytes of the encrypted file. So, to decrypt a journal file in python, run Should you ever want to decrypt your journal manually, you can do so with any program that supports the AES algorithm. The key used for encryption is the SHA-256-hash of your password, and the IV (initialisation vector) is stored in the first 16 bytes of the encrypted file. So, to decrypt a journal file in python, run
import hashlib, Crypto.Cipher import hashlib, Crypto.Cipher