mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 03:28:31 +02:00
Updated docs from master
This commit is contained in:
parent
fee1a95fcb
commit
0906f17fb4
38 changed files with 69 additions and 61 deletions
|
@ -29,7 +29,7 @@ If you don't initially store the password in the keychain but decide to do so at
|
|||
Manual decryption
|
||||
-----------------
|
||||
|
||||
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 in CBC. The key used for encryption is the SHA-256-hash of your password, the IV (initialisation vector) is stored in the first 16 bytes of the encrypted file. The plain text is encoded in UTF-8 and padded according to PKCS#7 before being encrypted. So, to decrypt a journal file in python, run::
|
||||
|
||||
import hashlib, Crypto.Cipher
|
||||
key = hashlib.sha256(my_password).digest()
|
||||
|
@ -37,3 +37,5 @@ Should you ever want to decrypt your journal manually, you can do so with any pr
|
|||
cipher = f.read()
|
||||
crypto = AES.new(key, AES.MODE_CBC, iv = cipher[:16])
|
||||
plain = crypto.decrypt(cipher[16:])
|
||||
plain = plain.strip(plain[-1])
|
||||
plain = plain.decode("utf-8")
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Advanced Usage — jrnl 1.7.19 documentation</title>
|
||||
<title>Advanced Usage — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
<link rel="next" title="FAQ" href="recipes.html" />
|
||||
<link rel="prev" title="Import and Export" href="export.html" />
|
||||
|
||||
|
|
BIN
docs/_build/doctrees/encryption.doctree
vendored
BIN
docs/_build/doctrees/encryption.doctree
vendored
Binary file not shown.
BIN
docs/_build/doctrees/environment.pickle
vendored
BIN
docs/_build/doctrees/environment.pickle
vendored
Binary file not shown.
BIN
docs/_build/doctrees/index.doctree
vendored
BIN
docs/_build/doctrees/index.doctree
vendored
Binary file not shown.
BIN
docs/_build/doctrees/installation.doctree
vendored
BIN
docs/_build/doctrees/installation.doctree
vendored
Binary file not shown.
BIN
docs/_build/doctrees/recipes.doctree
vendored
BIN
docs/_build/doctrees/recipes.doctree
vendored
Binary file not shown.
BIN
docs/_build/doctrees/usage.doctree
vendored
BIN
docs/_build/doctrees/usage.doctree
vendored
Binary file not shown.
2
docs/_build/html/.buildinfo
vendored
2
docs/_build/html/.buildinfo
vendored
|
@ -1,4 +1,4 @@
|
|||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 0cb5b3ee0cc70978537b33c6a95755d0
|
||||
config: 4b74cf81a11ea71e0cbbd1cfc45991b8
|
||||
tags: fbb0d17656682115ca4d033fb2f83ba1
|
||||
|
|
4
docs/_build/html/_sources/encryption.txt
vendored
4
docs/_build/html/_sources/encryption.txt
vendored
|
@ -29,7 +29,7 @@ If you don't initially store the password in the keychain but decide to do so at
|
|||
Manual decryption
|
||||
-----------------
|
||||
|
||||
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 in CBC. The key used for encryption is the SHA-256-hash of your password, the IV (initialisation vector) is stored in the first 16 bytes of the encrypted file. The plain text is encoded in UTF-8 and padded according to PKCS#7 before being encrypted. So, to decrypt a journal file in python, run::
|
||||
|
||||
import hashlib, Crypto.Cipher
|
||||
key = hashlib.sha256(my_password).digest()
|
||||
|
@ -37,3 +37,5 @@ Should you ever want to decrypt your journal manually, you can do so with any pr
|
|||
cipher = f.read()
|
||||
crypto = AES.new(key, AES.MODE_CBC, iv = cipher[:16])
|
||||
plain = crypto.decrypt(cipher[16:])
|
||||
plain = plain.strip(plain[-1])
|
||||
plain = plain.decode("utf-8")
|
||||
|
|
6
docs/_build/html/advanced.html
vendored
6
docs/_build/html/advanced.html
vendored
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Advanced Usage — jrnl 1.7.19 documentation</title>
|
||||
<title>Advanced Usage — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
<link rel="next" title="FAQ" href="recipes.html" />
|
||||
<link rel="prev" title="Import and Export" href="export.html" />
|
||||
|
||||
|
|
10
docs/_build/html/encryption.html
vendored
10
docs/_build/html/encryption.html
vendored
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Encryption — jrnl 1.7.19 documentation</title>
|
||||
<title>Encryption — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
<link rel="next" title="Import and Export" href="export.html" />
|
||||
<link rel="prev" title="Basic Usage" href="usage.html" />
|
||||
|
||||
|
@ -61,13 +61,15 @@
|
|||
</div>
|
||||
<div class="section" id="manual-decryption">
|
||||
<h2>Manual decryption<a class="headerlink" href="#manual-decryption" title="Permalink to this headline">¶</a></h2>
|
||||
<p>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:</p>
|
||||
<p>Should you ever want to decrypt your journal manually, you can do so with any program that supports the AES algorithm in CBC. The key used for encryption is the SHA-256-hash of your password, the IV (initialisation vector) is stored in the first 16 bytes of the encrypted file. The plain text is encoded in UTF-8 and padded according to PKCS#7 before being encrypted. So, to decrypt a journal file in python, run:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">hashlib</span><span class="o">,</span> <span class="nn">Crypto.Cipher</span>
|
||||
<span class="n">key</span> <span class="o">=</span> <span class="n">hashlib</span><span class="o">.</span><span class="n">sha256</span><span class="p">(</span><span class="n">my_password</span><span class="p">)</span><span class="o">.</span><span class="n">digest</span><span class="p">()</span>
|
||||
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="s">"my_journal.txt"</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
|
||||
<span class="n">cipher</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
|
||||
<span class="n">crypto</span> <span class="o">=</span> <span class="n">AES</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">AES</span><span class="o">.</span><span class="n">MODE_CBC</span><span class="p">,</span> <span class="n">iv</span> <span class="o">=</span> <span class="n">cipher</span><span class="p">[:</span><span class="mi">16</span><span class="p">])</span>
|
||||
<span class="n">plain</span> <span class="o">=</span> <span class="n">crypto</span><span class="o">.</span><span class="n">decrypt</span><span class="p">(</span><span class="n">cipher</span><span class="p">[</span><span class="mi">16</span><span class="p">:])</span>
|
||||
<span class="n">plain</span> <span class="o">=</span> <span class="n">plain</span><span class="o">.</span><span class="n">strip</span><span class="p">(</span><span class="n">plain</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>
|
||||
<span class="n">plain</span> <span class="o">=</span> <span class="n">plain</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s">"utf-8"</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
6
docs/_build/html/export.html
vendored
6
docs/_build/html/export.html
vendored
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Import and Export — jrnl 1.7.19 documentation</title>
|
||||
<title>Import and Export — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
<link rel="next" title="Advanced Usage" href="advanced.html" />
|
||||
<link rel="prev" title="Encryption" href="encryption.html" />
|
||||
|
||||
|
|
6
docs/_build/html/genindex.html
vendored
6
docs/_build/html/genindex.html
vendored
|
@ -9,7 +9,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Index — jrnl 1.7.19 documentation</title>
|
||||
<title>Index — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -17,7 +17,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -26,7 +26,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
|
||||
<link rel="apple-touch-icon-precomposed" href="_static/img/favicon-152.png">
|
||||
|
|
6
docs/_build/html/installation.html
vendored
6
docs/_build/html/installation.html
vendored
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Getting started — jrnl 1.7.19 documentation</title>
|
||||
<title>Getting started — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
<link rel="next" title="Basic Usage" href="usage.html" />
|
||||
<link rel="prev" title="Overview" href="overview.html" />
|
||||
|
||||
|
|
BIN
docs/_build/html/objects.inv
vendored
BIN
docs/_build/html/objects.inv
vendored
Binary file not shown.
6
docs/_build/html/overview.html
vendored
6
docs/_build/html/overview.html
vendored
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Overview — jrnl 1.7.19 documentation</title>
|
||||
<title>Overview — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
<link rel="next" title="Getting started" href="installation.html" />
|
||||
<link rel="prev" title="jrnl: The command-line journal" href="index.html" />
|
||||
|
||||
|
|
6
docs/_build/html/recipes.html
vendored
6
docs/_build/html/recipes.html
vendored
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>FAQ — jrnl 1.7.19 documentation</title>
|
||||
<title>FAQ — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
<link rel="prev" title="Advanced Usage" href="advanced.html" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
|
||||
|
|
6
docs/_build/html/search.html
vendored
6
docs/_build/html/search.html
vendored
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Search — jrnl 1.7.19 documentation</title>
|
||||
<title>Search — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -25,7 +25,7 @@
|
|||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="_static/searchtools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
<script type="text/javascript">
|
||||
jQuery(function() { Search.loadIndex("searchindex.js"); });
|
||||
</script>
|
||||
|
|
2
docs/_build/html/searchindex.js
vendored
2
docs/_build/html/searchindex.js
vendored
File diff suppressed because one or more lines are too long
6
docs/_build/html/usage.html
vendored
6
docs/_build/html/usage.html
vendored
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Basic Usage — jrnl 1.7.19 documentation</title>
|
||||
<title>Basic Usage — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
<link rel="next" title="Encryption" href="encryption.html" />
|
||||
<link rel="prev" title="Getting started" href="installation.html" />
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Encryption — jrnl 1.7.19 documentation</title>
|
||||
<title>Encryption — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
<link rel="next" title="Import and Export" href="export.html" />
|
||||
<link rel="prev" title="Basic Usage" href="usage.html" />
|
||||
|
||||
|
@ -61,13 +61,15 @@
|
|||
</div>
|
||||
<div class="section" id="manual-decryption">
|
||||
<h2>Manual decryption<a class="headerlink" href="#manual-decryption" title="Permalink to this headline">¶</a></h2>
|
||||
<p>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:</p>
|
||||
<p>Should you ever want to decrypt your journal manually, you can do so with any program that supports the AES algorithm in CBC. The key used for encryption is the SHA-256-hash of your password, the IV (initialisation vector) is stored in the first 16 bytes of the encrypted file. The plain text is encoded in UTF-8 and padded according to PKCS#7 before being encrypted. So, to decrypt a journal file in python, run:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">hashlib</span><span class="o">,</span> <span class="nn">Crypto.Cipher</span>
|
||||
<span class="n">key</span> <span class="o">=</span> <span class="n">hashlib</span><span class="o">.</span><span class="n">sha256</span><span class="p">(</span><span class="n">my_password</span><span class="p">)</span><span class="o">.</span><span class="n">digest</span><span class="p">()</span>
|
||||
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="s">"my_journal.txt"</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
|
||||
<span class="n">cipher</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
|
||||
<span class="n">crypto</span> <span class="o">=</span> <span class="n">AES</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">AES</span><span class="o">.</span><span class="n">MODE_CBC</span><span class="p">,</span> <span class="n">iv</span> <span class="o">=</span> <span class="n">cipher</span><span class="p">[:</span><span class="mi">16</span><span class="p">])</span>
|
||||
<span class="n">plain</span> <span class="o">=</span> <span class="n">crypto</span><span class="o">.</span><span class="n">decrypt</span><span class="p">(</span><span class="n">cipher</span><span class="p">[</span><span class="mi">16</span><span class="p">:])</span>
|
||||
<span class="n">plain</span> <span class="o">=</span> <span class="n">plain</span><span class="o">.</span><span class="n">strip</span><span class="p">(</span><span class="n">plain</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">])</span>
|
||||
<span class="n">plain</span> <span class="o">=</span> <span class="n">plain</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s">"utf-8"</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Import and Export — jrnl 1.7.19 documentation</title>
|
||||
<title>Import and Export — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
<link rel="next" title="Advanced Usage" href="advanced.html" />
|
||||
<link rel="prev" title="Encryption" href="encryption.html" />
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Index — jrnl 1.7.19 documentation</title>
|
||||
<title>Index — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -17,7 +17,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -26,7 +26,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
|
||||
<link rel="apple-touch-icon-precomposed" href="_static/img/favicon-152.png">
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Getting started — jrnl 1.7.19 documentation</title>
|
||||
<title>Getting started — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
<link rel="next" title="Basic Usage" href="usage.html" />
|
||||
<link rel="prev" title="Overview" href="overview.html" />
|
||||
|
||||
|
|
BIN
jrnl/Entry.pyc
BIN
jrnl/Entry.pyc
Binary file not shown.
BIN
jrnl/Journal.pyc
BIN
jrnl/Journal.pyc
Binary file not shown.
Binary file not shown.
BIN
jrnl/cli.pyc
BIN
jrnl/cli.pyc
Binary file not shown.
Binary file not shown.
BIN
jrnl/install.pyc
BIN
jrnl/install.pyc
Binary file not shown.
BIN
jrnl/util.pyc
BIN
jrnl/util.pyc
Binary file not shown.
BIN
objects.inv
BIN
objects.inv
Binary file not shown.
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Overview — jrnl 1.7.19 documentation</title>
|
||||
<title>Overview — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
<link rel="next" title="Getting started" href="installation.html" />
|
||||
<link rel="prev" title="jrnl: The command-line journal" href="index.html" />
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>FAQ — jrnl 1.7.19 documentation</title>
|
||||
<title>FAQ — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
<link rel="prev" title="Advanced Usage" href="advanced.html" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Search — jrnl 1.7.19 documentation</title>
|
||||
<title>Search — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -25,7 +25,7 @@
|
|||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="_static/searchtools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
<script type="text/javascript">
|
||||
jQuery(function() { Search.loadIndex("searchindex.js"); });
|
||||
</script>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Basic Usage — jrnl 1.7.19 documentation</title>
|
||||
<title>Basic Usage — jrnl 1.7.22 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '',
|
||||
VERSION: '1.7.19',
|
||||
VERSION: '1.7.22',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<link rel="top" title="jrnl 1.7.19 documentation" href="index.html" />
|
||||
<link rel="top" title="jrnl 1.7.22 documentation" href="index.html" />
|
||||
<link rel="next" title="Encryption" href="encryption.html" />
|
||||
<link rel="prev" title="Getting started" href="installation.html" />
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue