Add sha1 implementation from polarssl