Skip to content

Instantly share code, notes, and snippets.

View prokls's full-sized avatar

prokls

  • Some University in Graz, Austria
View GitHub Profile
@prokls
prokls / md4.py
Last active April 9, 2016 22:18 — forked from tristanwietsma/md4.py
MD4 in pure Python 3.4. Based on @tristanwietsma's MD4 implementation: https://gist.github.com/tristanwietsma/5937448
#!/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: