This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import struct | |
import binascii | |
BYTEORDER='big' | |
def _pad(msg): | |
n = len(msg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
__base__ = 'https://github.com/thomdixon/pysha2/blob/master/sha2/sha256.py' | |
__author__ = 'Lukas Prokop' | |
__license__ = 'MIT' | |
import copy | |
import struct | |
import binascii |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import binascii | |
def _pad(msg): | |
n = len(msg) | |
bit_len = n * 8 | |
index = n & 0x3f | |
pad_len = 120 - index | |
if index < 56: |