Redigera

Dela via


hashes resource type

Namespace: microsoft.graph

The hashes resource groups available hashes into a single structure for an item.

Note: Not all services provide a value for all hash properties listed.

JSON representation

The following JSON representation shows the resource type.

{
  "crc32Hash": "string (hex)",
  "sha1Hash": "string (hex)",
  "sha256Hash": "string (hex)",
  "quickXorHash": "string (base64)"
}

Properties

Property Type Description
crc32Hash String The CRC32 value of the file in little endian (if available). Read-only.
quickXorHash String A proprietary hash of the file that can be used to determine if the contents of the file have changed (if available). Read-only.
sha1Hash String SHA1 hash for the contents of the file (if available). Read-only.
sha256Hash String SHA256 hash for the contents of the file (if available). Read-only.

Note: In some cases hash values may not be available. If this is the case, the hash values on an item will be updated after the item is downloaded.

Remarks

In OneDrive for Business and SharePoint Server 2016, sha1Hash and crc32Hash, and sha256Hash are not available.

In OneDrive Personal, quickXorHash is not available.

To calculate quickXorHash for a file, refer to the QuickXorHash snippet. For more information about the facets on a DriveItem, see DriveItem.