Entity hashing is done in content_hash#getEntityHashes.
- It works by looking at the entity_changestable and going through each of the entity names/types:- blobs
- attributes
- revisions
- attachments
- notes
- branches
- etapi_tokens
- options
 
- For some reason note_reorderingentities are ignored specifically.
- All the rows in entity_changesare then ordered alphabetically, based on theirentityId.
- Every entity row is then grouped by entityNameand then by sector. The sector is defined as the first character of theid.
- The hash is altered to add the isErasedvalue as well since the hash of deleted entries is not updated.
- For each sector, the hash is calculated using utils.hash, using SHA1 encoded as Base64.