New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

quickxorhash

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quickxorhash

Quick XOR hash function for OneDrive for Business

  • 1.0.5
  • PyPI
  • Socket score

Maintainers
1

This python library is a Cython wrapper for the original C implementation. 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

>>> 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='

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc