blob: 822f8a9159ec7ebe1b6c20af5222f3fe7f471a55 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
=================================================================
:samp:`passlib.hash.ldap_pbkdf2_{digest}` - Generic PBKDF2 Hashes
=================================================================
.. index:: pbkdf2 hash; generic ldap
.. currentmodule:: passlib.hash
PassLib provides three custom hash schemes based on the PBKDF2 [#pbkdf2]_ algorithm
which are compatible with the :ref:`ldap hash format <ldap-hashes>`:
:class:`!ldap_pbkdf2_sha1`, :class:`!ldap_pbkdf2_sha256`, :class:`!ldap_pbkdf2_sha512`.
They feature variable length salts, variable rounds.
.. seealso::
These classes are simply wrappers around the :doc:`MCF-Compatible Simple PBKDF2 Hashes <passlib.hash.pbkdf2_digest>`.
Interface
=========
.. class:: ldap_pbkdf2_sha1()
this is the same as :class:`pbkdf2_sha1`, except that it
uses ``{PBKDF2}`` as it's identifying prefix instead of ``$pdkdf2$``.
.. class:: ldap_pbkdf2_sha256()
this is the same as :class:`pbkdf2_sha256`, except that it
uses ``{PBKDF2-SHA256}`` as it's identifying prefix instead of ``$pdkdf2-sha256$``.
.. class:: ldap_pbkdf2_sha512()
this is the same as :class:`pbkdf2_sha512`, except that it
uses ``{PBKDF2-SHA512}`` as it's identifying prefix instead of ``$pdkdf2-sha512$``.
.. rubric:: Footnotes
.. [#pbkdf2] The specification for the PBKDF2 algorithm - `<http://tools.ietf.org/html/rfc2898#section-5.2>`_,
part of :rfc:`2898`.
|