File: passlib.hash.ldap_pbkdf2_digest.rst

package info (click to toggle)
python-passlib 1.7.4-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,920 kB
  • sloc: python: 23,094; makefile: 3
file content (38 lines) | stat: -rw-r--r-- 1,424 bytes parent folder | download | duplicates (6)
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 its identifying prefix instead of ``$pdkdf2$``.

.. class:: ldap_pbkdf2_sha256()

    this is the same as :class:`pbkdf2_sha256`, except that it
    uses ``{PBKDF2-SHA256}`` as its 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 its 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`.