summaryrefslogtreecommitdiff
path: root/choose_rounds.py
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2016-06-10 12:32:52 -0400
committerEli Collins <elic@assurancetechnologies.com>2016-06-10 12:32:52 -0400
commit281dacd121d72c7570442a13f2113f63c6c439ba (patch)
tree997fcabde572da2fc5c8158243e26cce64ee3874 /choose_rounds.py
parent61dc39910c6904c69f2e81d5dd41090cac1f18a1 (diff)
downloadpasslib-281dacd121d72c7570442a13f2113f63c6c439ba.tar.gz
.encrypt() method renamed to .hash(), other api cleanups
.encrypt() ---------- hash.encrypt() & context.encrypt() have been renamed to .hash(). this should take care of the long-standing issue 21 (the poor naming of .encrypt). per docs, legacy aliases will remain in place until passlib 2.0. .genhash() / .genconfig() ------------------------- taking advantage of this reorganization to also deprecate .genconfig() and .genhash() -- they're not really useful in a modern system, nor as needed for historical support as initially thought: .genconfig() will be retired completely in passlib 2.0; .genhash() is rolled into the new .hash() method along with .encrypt().
Diffstat (limited to 'choose_rounds.py')
-rw-r--r--choose_rounds.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/choose_rounds.py b/choose_rounds.py
index 43c4502..e8607e9 100644
--- a/choose_rounds.py
+++ b/choose_rounds.py
@@ -103,7 +103,7 @@ def main(*args):
"""estimate speed using specified # of rounds"""
# time a single verify() call
secret = "S0m3-S3Kr1T"
- hash = hasher.encrypt(secret, rounds=rounds)
+ hash = hasher.hash(secret, rounds=rounds)
def helper():
start = tick()
hasher.verify(secret, hash)