Use public domain SHA1 code, remove libgcrypt dependency