summaryrefslogtreecommitdiff
path: root/venv/Lib/site-packages/astroid/brain/brain_hashlib.py
diff options
context:
space:
mode:
authorpravindalve2023-05-30 04:20:14 +0530
committerGitHub2023-05-30 04:20:14 +0530
commitcbdd7ca21f1f673a3a739065098f7cc6c9c4b881 (patch)
tree595e888c38f00a314e751096b6bf636a544a5efe /venv/Lib/site-packages/astroid/brain/brain_hashlib.py
parent7740d1ca0c2e6bf34900460b0c58fa4d528577fb (diff)
parent280c6aa89a15331fb76b7014957953dc72af6093 (diff)
downloadChemical-Simulator-GUI-master.tar.gz
Chemical-Simulator-GUI-master.tar.bz2
Chemical-Simulator-GUI-master.zip
Merge pull request #63 from brenda-br/Fix-35HEADmaster
Restructure Project and Deployment
Diffstat (limited to 'venv/Lib/site-packages/astroid/brain/brain_hashlib.py')
-rw-r--r--venv/Lib/site-packages/astroid/brain/brain_hashlib.py67
1 files changed, 0 insertions, 67 deletions
diff --git a/venv/Lib/site-packages/astroid/brain/brain_hashlib.py b/venv/Lib/site-packages/astroid/brain/brain_hashlib.py
deleted file mode 100644
index 98ae774..0000000
--- a/venv/Lib/site-packages/astroid/brain/brain_hashlib.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright (c) 2016, 2018 Claudiu Popa <pcmanticore@gmail.com>
-# Copyright (c) 2018 Ioana Tagirta <ioana.tagirta@gmail.com>
-
-# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
-# For details: https://github.com/PyCQA/astroid/blob/master/COPYING.LESSER
-import sys
-
-import six
-
-import astroid
-
-PY36 = sys.version_info >= (3, 6)
-
-
-def _hashlib_transform():
- signature = "value=''"
- template = """
- class %(name)s(object):
- def __init__(self, %(signature)s): pass
- def digest(self):
- return %(digest)s
- def copy(self):
- return self
- def update(self, value): pass
- def hexdigest(self):
- return ''
- @property
- def name(self):
- return %(name)r
- @property
- def block_size(self):
- return 1
- @property
- def digest_size(self):
- return 1
- """
- algorithms_with_signature = dict.fromkeys(
- ["md5", "sha1", "sha224", "sha256", "sha384", "sha512"], signature
- )
- if PY36:
- blake2b_signature = "data=b'', *, digest_size=64, key=b'', salt=b'', \
- person=b'', fanout=1, depth=1, leaf_size=0, node_offset=0, \
- node_depth=0, inner_size=0, last_node=False"
- blake2s_signature = "data=b'', *, digest_size=32, key=b'', salt=b'', \
- person=b'', fanout=1, depth=1, leaf_size=0, node_offset=0, \
- node_depth=0, inner_size=0, last_node=False"
- new_algorithms = dict.fromkeys(
- ["sha3_224", "sha3_256", "sha3_384", "sha3_512", "shake_128", "shake_256"],
- signature,
- )
- algorithms_with_signature.update(new_algorithms)
- algorithms_with_signature.update(
- {"blake2b": blake2b_signature, "blake2s": blake2s_signature}
- )
- classes = "".join(
- template
- % {
- "name": hashfunc,
- "digest": 'b""' if six.PY3 else '""',
- "signature": signature,
- }
- for hashfunc, signature in algorithms_with_signature.items()
- )
- return astroid.parse(classes)
-
-
-astroid.register_module_extender(astroid.MANAGER, "hashlib", _hashlib_transform)