Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

seahash

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seahash

A blazingly fast, portable hash function with proven statistical guarantees

  • 0.2.0
  • Source
  • PyPI
  • Socket score

Maintainers
1

SeaHash

CI PyPI PyPI - Python Version PyPI - Wheel PyPI - Status PyPI - License

Python bindings to seahash - A blazingly fast, portable hash function with proven statistical guarantees.

Installation

pip install seahash

Wheels should be available for most platforms. If you need a wheel which isn't provided, raise an issue.

Compiling from source will require a Rust toolchain.

Usage

Hashing can be done in 2 ways:

Primitive functions

import seahash

# Plain hash
seahash.hash(b"123")

# Hash with custom seeds
seahash.hash_seeded(b"123", 4, 5, 6, 7)

Both methods return an int.

hashlib-compatible class

For convenience, a hashlib-compatible class is provided:

import seahash

s = seahash.SeaHash()

s.update(b"123")

s.digest()
s.hexdigest()

The underlying int digest can be obtained with intdigest.

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