Skip to content

Instantly share code, notes, and snippets.

@BenWiederhake
BenWiederhake / sha1.py
Created July 22, 2018 17:47 — forked from bonsaiviking/sha1.py
SHA1 implementation in pure Python
#!/usr/bin/env python3
# Based on https://gist.github.com/bonsaiviking/5639034
# Converted to Python3 by hand.
import struct
def leftrotate(i, n):
return ((i << n) & 0xffffffff) | (i >> (32 - n))
@BenWiederhake
BenWiederhake / md4.py
Created July 22, 2018 17:45 — forked from bonsaiviking/md4.py
Simple MD4 digest implementation in pure Python
#!/usr/bin/env python3
# Based on https://gist.github.com/bonsaiviking/5644414
# Converted to Python3 by hand.
import codecs
import struct
def leftrotate(i, n):
return ((i << n) & 0xffffffff) | (i >> (32 - n))
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"