Hashing

In [8]:
import hashlib
In [5]:
b"gmit123".hex()
Out[5]:
'676d6974313233'
In [6]:
b"gmit122".hex()
Out[6]:
'676d6974313232'
In [5]:
hashlib.sha256(b"gmit123").hexdigest()
Out[5]:
'44ff97b3ae036a8d307a21398119676b613e6d993896df586f76d609990a3298'
In [7]:
hashlib.sha256(b"gmit122").hexdigest()
Out[7]:
'b3019a43b23d0c81f98e2903b2ff14157e9dbf32b9a33148778586a0335459b8'

From shadow:

Lbzy8/hZXnKqMKU/ifhaLN06aWdmI7BohpXrFO1jxjiHnywXyDr2PqF6USKdKFzXJox/In eWsnCE4uBjBge/00`

In [9]:
hashlib.sha512(b"d7Al66I.gmit123").digest()
Out[9]:
b'h\xf2s\xbe\x8db\xbe/\x94\xe4;\x81\xba\xd8U\xca#\x1c\x98\xb8\xe4;\xc4\x9e\xae\x89\xc9k\xf0_\xb1\xec%$\xe14\x8a\xcb\xbf\x14mTft\xe3\xd3K$\xf7\x7f\xc1S#\xd2\x88\xfa\xc5\x01~\xf6\xb7\xcd\xe0\x95'
In [3]:
"$6$d7Al66I.$6ExZp1Dv6rm/NerJRSTvstCAMwpHDsm1z/bKUZjRN8fywEuTJmfR5lFU2s9GRNjh1ydkRiWF0tlr5NAdvnx2h0"
Out[3]:
'$6$d7Al66I.$6ExZp1Dv6rm/NerJRSTvstCAMwpHDsm1z/bKUZjRN8fywEuTJmfR5lFU2s9GRNjh1ydkRiWF0tlr5NAdvnx2h0'
In [4]:
b"6ExZp1Dv6rm/NerJRSTvstCAMwpHDsm1z/bKUZjRN8fywEuTJmfR5lFU2s9GRNjh1ydkRiWF0tlr5NAdvnx2h0"
Out[4]:
b'6ExZp1Dv6rm/NerJRSTvstCAMwpHDsm1z/bKUZjRN8fywEuTJmfR5lFU2s9GRNjh1ydkRiWF0tlr5NAdvnx2h0'
In [1]:
import crypt
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-cd3f4f01282b> in <module>
----> 1 import crypt

~\Anaconda3\lib\crypt.py in <module>
      1 """Wrapper to the POSIX crypt library call and associated functionality."""
      2 
----> 3 import _crypt
      4 import string as _string
      5 from random import SystemRandom as _SystemRandom

ModuleNotFoundError: No module named '_crypt'
In [ ]: