Git runs the content (with a type and size header) through SHA-1 and uses the digest as the object id. Newer repositories can use SHA-256 instead, with 64 hex characters.