def _hashdigest(data): return RIPEMD.RIPEMD160Hash(data).digest()
}, "sha384": { "hashlib_hash": hashlib.new("sha384"), "crypto_hash": SHA384.SHA384Hash() }, "sha512": { "hashlib_hash": hashlib.new("sha512"), "crypto_hash": SHA512.SHA512Hash() }, "sha1": { "hashlib_hash": hashlib.new("sha1"), "crypto_hash": SHA.SHA1Hash() }, "ripemd160": { "hashlib_hash": hashlib.new("ripemd160"), "crypto_hash": RIPEMD.RIPEMD160Hash() } } # takes hasher def hashFile(filename, hasher): return hashit.hashIter(hashit.blockIter(open(filename, "rb")), hasher) def hashStr(binary, hasher): hasher.update(binary) return hasher.hexdigest() def NoMemFile(filename, hasher):