blob: 5e1a82a8f5aceaec3a459b6ffa89d41c53923756 [file] [log] [blame]
Alex Gaynor8d7fb752013-08-06 19:30:47 -07001Cryptography
2============
3
Matt Iversen09347622014-05-20 02:47:22 +10004.. image:: https://pypip.in/version/cryptography/badge.svg
5 :target: https://pypi.python.org/pypi/cryptography/
6 :alt: Latest Version
7
Paul Kehrera7fd4602014-03-24 07:22:47 -04008.. image:: https://travis-ci.org/pyca/cryptography.svg?branch=master
Alex Gaynor45afb352013-11-05 16:29:00 -08009 :target: https://travis-ci.org/pyca/cryptography
10
11.. image:: https://coveralls.io/repos/pyca/cryptography/badge.png?branch=master
12 :target: https://coveralls.io/r/pyca/cryptography?branch=master
13
Hynek Schlawackf30db512013-08-07 20:50:05 +020014
Alex Gaynor01ba7b72014-03-02 20:06:00 -080015``cryptography`` is a package which provides cryptographic recipes and
Alex Gaynor872cd972014-02-10 18:52:47 -080016primitives to Python developers. Our goal is for it to be your "cryptographic
17standard library". It supports Python 2.6-2.7, Python 3.2+, and PyPy.
Alex Gaynor7a6b5cb2013-08-07 09:56:34 -070018
Alex Gaynorc0469912014-02-11 14:21:46 -080019``cryptography`` includes both high level recipes, and low level interfaces to
20common cryptographic algorithms such as symmetric ciphers, message digests and
21key derivation functions. For example, to encrypt something with
22``cryptography``'s high level symmetric encryption recipe:
Alex Gaynor872cd972014-02-10 18:52:47 -080023
Alex Gaynor99936992014-02-11 14:10:37 -080024.. code-block:: pycon
Alex Gaynor872cd972014-02-10 18:52:47 -080025
26 >>> from cryptography.fernet import Fernet
27 >>> # Put this somewhere safe!
28 >>> key = Fernet.generate_key()
29 >>> f = Fernet(key)
30 >>> token = f.encrypt(b"A really secret message. Not for prying eyes.")
31 >>> token
32 '...'
33 >>> f.decrypt(token)
34 'A really secret message. Not for prying eyes.'
Alex Gaynor7a6b5cb2013-08-07 09:56:34 -070035
Donald Stufftbf9df012013-10-19 22:39:44 -040036You can find more information in the `documentation`_.
37
Paul Kehrerc01ddc82013-10-07 15:58:33 -050038Discussion
39~~~~~~~~~~
40
Alex Gaynora11e74c2014-02-01 16:25:56 -080041If you run into bugs, you can file them in our `issue tracker`_.
42
Paul Kehrerc01ddc82013-10-07 15:58:33 -050043We maintain a `cryptography-dev`_ mailing list for development discussion.
44
Alex Gaynore21e14a2013-10-22 14:25:49 -070045You can also join ``#cryptography-dev`` on Freenode to ask questions or get
46involved.
Paul Kehrerc01ddc82013-10-07 15:58:33 -050047
Alex Gaynore21e14a2013-10-22 14:25:49 -070048
49.. _`documentation`: https://cryptography.io/
Alex Gaynora11e74c2014-02-01 16:25:56 -080050.. _`issue tracker`: https://github.com/pyca/cryptography/issues
Paul Kehrerc01ddc82013-10-07 15:58:33 -050051.. _`cryptography-dev`: https://mail.python.org/mailman/listinfo/cryptography-dev