SHA1 implementation; functions library