aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-27 21:04:03 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-28 11:18:26 -0600
commit1050ddf44f0713a587cd0ba239e23c95064a39bc (patch)
tree336c1329b82370fda3050b8c787ed8a85d32dc1b /docs
parent1f8cd620cfbb854b0dfcdbf89c140160a8caba13 (diff)
downloadcryptography-1050ddf44f0713a587cd0ba239e23c95064a39bc.tar.gz
cryptography-1050ddf44f0713a587cd0ba239e23c95064a39bc.tar.bz2
cryptography-1050ddf44f0713a587cd0ba239e23c95064a39bc.zip
PBKDF2 support for OpenSSL backend
Diffstat (limited to 'docs')
-rw-r--r--docs/hazmat/backends/interfaces.rst39
1 files changed, 39 insertions, 0 deletions
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst
index 11e2f2a2..fa4f800c 100644
--- a/docs/hazmat/backends/interfaces.rst
+++ b/docs/hazmat/backends/interfaces.rst
@@ -131,3 +131,42 @@ A specific ``backend`` may provide one or more of these interfaces.
:returns:
:class:`~cryptography.hazmat.primitives.interfaces.HashContext`
+
+
+
+.. class:: PBKDF2Backend
+
+ A backend with methods for using PBKDF2.
+
+ .. method:: pbkdf2_hash_supported(algorithm)
+
+ Check if the specified ``algorithm`` is supported by this backend.
+
+ :param algorithm: An instance of a
+ :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm`
+ provider.
+
+ :returns: ``True`` if the specified ``algorithm`` is supported for
+ PBKDF2 by this backend, otherwise ``False``.
+
+ .. method:: derive_pbkdf2(self, algorithm, length, salt, iterations,
+ key_material)
+
+ :param algorithm: An instance of a
+ :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm`
+ provider.
+
+ :param int length: The desired length of the derived key. Maximum is
+ 2\ :sup:`31` - 1.
+
+ :param bytes salt: A salt. `RFC 2898`_ recommends 64-bits or longer.
+
+ :param int iterations: The number of iterations to perform of the hash
+ function.
+
+ :param bytes key_material: The key material to use as a basis for
+ the derived key. This is typically a password.
+
+ :return bytes: Derived key.
+
+.. _`RFC 2898`: https://www.ietf.org/rfc/rfc2898.txt