README.rst 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. pyca/cryptography
  2. =================
  3. .. image:: https://img.shields.io/pypi/v/cryptography.svg
  4. :target: https://pypi.org/project/cryptography/
  5. :alt: Latest Version
  6. .. image:: https://readthedocs.org/projects/cryptography/badge/?version=latest
  7. :target: https://cryptography.io
  8. :alt: Latest Docs
  9. .. image:: https://github.com/pyca/cryptography/workflows/CI/badge.svg?branch=main
  10. :target: https://github.com/pyca/cryptography/actions?query=workflow%3ACI+branch%3Amain
  11. ``cryptography`` is a package which provides cryptographic recipes and
  12. primitives to Python developers. Our goal is for it to be your "cryptographic
  13. standard library". It supports Python 3.7+ and PyPy3 7.3.10+.
  14. ``cryptography`` includes both high level recipes and low level interfaces to
  15. common cryptographic algorithms such as symmetric ciphers, message digests, and
  16. key derivation functions. For example, to encrypt something with
  17. ``cryptography``'s high level symmetric encryption recipe:
  18. .. code-block:: pycon
  19. >>> from cryptography.fernet import Fernet
  20. >>> # Put this somewhere safe!
  21. >>> key = Fernet.generate_key()
  22. >>> f = Fernet(key)
  23. >>> token = f.encrypt(b"A really secret message. Not for prying eyes.")
  24. >>> token
  25. b'...'
  26. >>> f.decrypt(token)
  27. b'A really secret message. Not for prying eyes.'
  28. You can find more information in the `documentation`_.
  29. You can install ``cryptography`` with:
  30. .. code-block:: console
  31. $ pip install cryptography
  32. For full details see `the installation documentation`_.
  33. Discussion
  34. ~~~~~~~~~~
  35. If you run into bugs, you can file them in our `issue tracker`_.
  36. We maintain a `cryptography-dev`_ mailing list for development discussion.
  37. You can also join ``#pyca`` on ``irc.libera.chat`` to ask questions or get
  38. involved.
  39. Security
  40. ~~~~~~~~
  41. Need to report a security issue? Please consult our `security reporting`_
  42. documentation.
  43. .. _`documentation`: https://cryptography.io/
  44. .. _`the installation documentation`: https://cryptography.io/en/latest/installation/
  45. .. _`issue tracker`: https://github.com/pyca/cryptography/issues
  46. .. _`cryptography-dev`: https://mail.python.org/mailman/listinfo/cryptography-dev
  47. .. _`security reporting`: https://cryptography.io/en/latest/security/