Move primtives into a hazmat package
diff --git a/docs/architecture.rst b/docs/architecture.rst
index 0a9550c..8de8649 100644
--- a/docs/architecture.rst
+++ b/docs/architecture.rst
@@ -10,9 +10,9 @@
* ``cryptography.bindings``: This package contains bindings to low level
cryptographic libraries. Our initial target will be OpenSSL.
-* ``cryptography.primitives``: This packages contains low level algorithms,
- things like ``AES`` or ``SHA1``. This is implemented on top of
+* ``cryptography.hazmat.primitives``: This packages contains low level
+ algorithms, things like ``AES`` or ``SHA1``. This is implemented on top of
``cryptography.bindings``.
* ``cryptography``: This package contains higher level recipes, for example
"encrypt and then MAC". This is implemented on top of
- ``cryptography.primitives``.
+ ``cryptography.hazmat.primitives``.
diff --git a/docs/primitives/cryptographic-hashes.rst b/docs/hazmat/primitives/cryptographic-hashes.rst
similarity index 97%
rename from docs/primitives/cryptographic-hashes.rst
rename to docs/hazmat/primitives/cryptographic-hashes.rst
index dcf2125..0500408 100644
--- a/docs/primitives/cryptographic-hashes.rst
+++ b/docs/hazmat/primitives/cryptographic-hashes.rst
@@ -1,7 +1,7 @@
Message Digests
===============
-.. currentmodule:: cryptography.primitives.hashes
+.. currentmodule:: cryptography.hazmat.primitives.hashes
.. class:: BaseHash(data=None)
diff --git a/docs/primitives/index.rst b/docs/hazmat/primitives/index.rst
similarity index 100%
rename from docs/primitives/index.rst
rename to docs/hazmat/primitives/index.rst
diff --git a/docs/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst
similarity index 93%
rename from docs/primitives/symmetric-encryption.rst
rename to docs/hazmat/primitives/symmetric-encryption.rst
index 87e1e69..e2586aa 100644
--- a/docs/primitives/symmetric-encryption.rst
+++ b/docs/hazmat/primitives/symmetric-encryption.rst
@@ -1,7 +1,7 @@
Symmetric Encryption
====================
-.. currentmodule:: cryptography.primitives.block
+.. currentmodule:: cryptography.hazmat.primitives.block
.. testsetup::
@@ -22,7 +22,7 @@
.. doctest::
- >>> from cryptography.primitives.block import BlockCipher, ciphers, modes
+ >>> from cryptography.hazmat.primitives.block import BlockCipher, ciphers, modes
>>> cipher = BlockCipher(ciphers.AES(key), modes.CBC(iv))
>>> encryptor = cipher.encryptor()
>>> ct = encryptor.update(b"a secret message") + encryptor.finalize()
@@ -36,16 +36,16 @@
.. method:: encryptor()
:return: An encrypting
- :class:`~cryptography.primitives.interfaces.CipherContext`
+ :class:`~cryptography.hazmat.primitives.interfaces.CipherContext`
provider.
.. method:: decryptor()
:return: A decrypting
- :class:`~cryptography.primitives.interfaces.CipherContext`
+ :class:`~cryptography.hazmat.primitives.interfaces.CipherContext`
provider.
-.. currentmodule:: cryptography.primitives.interfaces
+.. currentmodule:: cryptography.hazmat.primitives.interfaces
.. class:: CipherContext()
@@ -68,7 +68,7 @@
Ciphers
~~~~~~~
-.. currentmodule:: cryptography.primitives.block.ciphers
+.. currentmodule:: cryptography.hazmat.primitives.block.ciphers
.. class:: AES(key)
@@ -109,7 +109,7 @@
Modes
~~~~~
-.. currentmodule:: cryptography.primitives.block.modes
+.. currentmodule:: cryptography.hazmat.primitives.block.modes
.. class:: CBC(initialization_vector)
diff --git a/docs/index.rst b/docs/index.rst
index a868a5d..47418ab 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -31,8 +31,15 @@
:maxdepth: 2
architecture
- primitives/index
bindings/index
contributing
security
community
+
+Hazard Materials
+----------------
+
+.. toctree::
+ :maxdepth: 2
+
+ hazmat/primitives/index