fix sha1 algorithm bug in mac os