From 4448e6ee7ba040c2582618a291e9cb28af57e511 Mon Sep 17 00:00:00 2001 From: lakshyacis Date: Mon, 23 Sep 2019 17:52:56 +0530 Subject: [PATCH] hash pylint fixes --- src/pyelliptic/hash.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pyelliptic/hash.py b/src/pyelliptic/hash.py index 2d7064f8..c21dd6a4 100644 --- a/src/pyelliptic/hash.py +++ b/src/pyelliptic/hash.py @@ -1,6 +1,9 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- - +""" +src/pyelliptic/hash.py +===================== +""" # Copyright (C) 2011 Yann GUIBET # See LICENSE for details. @@ -30,8 +33,7 @@ def equals(a, b): """Compare two strings or bytearrays""" if isinstance(a, str): return _equals_str(a, b) - else: - return _equals_bytes(a, b) + return _equals_bytes(a, b) def hmac_sha256(k, m): @@ -59,7 +61,7 @@ def hmac_sha512(k, m): def pbkdf2(password, salt=None, i=10000, keylen=64): - """Compute the salt, key and the message with pbkdf2""" + """Key derivation function using SHA256""" if salt is None: salt = OpenSSL.rand(8) p_password = OpenSSL.malloc(password, len(password))