Skip to main content

Quick XOR hash function for OneDrive for Business

Project description

This python library is a Cython wrapper for the [original C implementation](https://https://github.com/flowerysong/quickxorhash). quickxorhash is a C library (libqxh) implementing Microsoft’s QuickXORHash algorithm.

## Algorithm

QuickXORHash is a non-cryptographic hash function that XORs the input bytes in a circular shift pattern, then XORs the least significant bits of the hash with the input length. The canonical representation of the resulting hash is a Base64 encoded string, because hexadecimal is too plebeian.

## Usage `python >>> import quickxorhash >>> h = quickxorhash.quickxorhash() >>> h.update(b'hello world') >>> print(h.digest()) b'h(\x03\x1b\xd8\xf0\x06\x10\xdc\xe1\rrk\x03\x19\x00\x00\x00\x00\x00' >>> import base64 >>> print(base64.b64encode(h.digest())) b'aCgDG9jwBhDc4Q1yawMZAAAAAAA=' `

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quickxorhash-1.0.5.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file quickxorhash-1.0.5.tar.gz.

File metadata

  • Download URL: quickxorhash-1.0.5.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.2

File hashes

Hashes for quickxorhash-1.0.5.tar.gz
Algorithm Hash digest
SHA256 4d0857357bfab95d701ed145beae1fc8d8ac9386aa7475932e82e2afd96a8bb0
MD5 ba9050f8e914f2bd289ba509973ed21c
BLAKE2b-256 8d85699be9823e7c0a617efdf576d5bd38d85e7dccaed7d8caad4f854be53f44

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page