Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If what you mean is that you want to roll your own encryption system, you could try using the built-in <code>hmac</code> and <code>hashlib</code> modules. (<code>hashlib</code> is new for 2.5, so if you must use an earlier Python, your hash choices are the older <code>md5</code> and <code>sha</code> modules.)</p> <p>If you are opposed to (or are prevented from) <em>installing</em> a third-party library but are OK with using third-party algorithms or even "lightweight" third-party implementations of algorithms (e.g. published Python source code which resides in a single .py file that you can incorporate or import yourself without using <code>setup.py</code> or any other <em>formal</em> installation), then I highly recommend you do so, because these are likely to be better than what you can come up with on your own.</p> <p>The smallest and user-friendliest of these that I am aware of is known as <strong>p3</strong>, written by cryptographer Paul Rubin. The original link is no longer active but you can search for it. Googling currently yields <a href="https://github.com/zhangchunlin/gitldapacl/blob/master/p3.py" rel="nofollow noreferrer">a near-exact copy</a> as well as <a href="https://sourceforge.net/p/treeline/devel/ci/default/tree/source/p3.py" rel="nofollow noreferrer">an adaptation for Python 3</a>.</p> <p>You could also try one of several single-module, pure-Python <a href="https://en.wikipedia.org/wiki/Advanced_Encryption_Standard" rel="nofollow noreferrer">Rijndael (AES)</a> implementations such as <a href="http://fastcrypto.org/umac/2004/src/rijndael.py" rel="nofollow noreferrer">this</a> or <a href="http://www.bjrn.se/code/rijndaelpy.txt" rel="nofollow noreferrer">this</a>. (Again, links are not guaranteed to be permanent so you may have to do some searching.)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload