File: md4.py

package info (click to toggle)
python-passlib 1.9.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,184 kB
  • sloc: python: 26,132; makefile: 7
file content (25 lines) | stat: -rw-r--r-- 679 bytes parent folder | download
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
"""
passlib.utils.md4 - DEPRECATED MODULE, WILL BE REMOVED IN 2.0

MD4 should now be looked up through ``passlib.crypto.digest.lookup_hash("md4").const``,
which provides unified handling stdlib implementation (if present).
"""

from warnings import warn

from passlib.crypto.digest import lookup_hash

warn(
    "the module 'passlib.utils.md4' is deprecated as of Passlib 1.7, "
    "and will be removed in Passlib 2.0, please use "
    "'lookup_hash(\"md4\").const()' from 'passlib.crypto' instead",
    DeprecationWarning,
)

__all__ = ["md4"]

# this should use hashlib version if available,
# and fall back to builtin version.

md4 = lookup_hash("md4").const
del lookup_hash