Skip to main content

A hashing algorithm that is slower and more secure than bcrypt.

Project description

valphor

A hashing algorithm that is slower and more secure than bcrypt.

Installation

#!/bin/bash
pip install valphor

Usage

import valphor

hashed = valphor.hash(b"password", valphor.salt())
is_valid = valphor.verify(hashed, b"password")
print(is_valid)

Functions

  • salt(length: int = 16, cost: int = 12) -> bytes

    Generates a cryptographically secure salt of the specified length.
    The cost parameter controls the computational complexity, increasing resistance against brute-force attacks.

  • hash(verify_str: bytes, salt: bytes, length: int = 512) -> bytes

    Generates a secure hash of the input verify_str using the Valphor algorithm with the provided salt.
    The length parameter defines the length of the resulting hash in bits, enhancing flexibility for different security needs.

  • verify(hashed: bytes, verify_str: bytes) -> bool

    Checks whether the provided verify_str matches the given hashed value using the Valphor verification process.
    Returns True if the verification succeeds, otherwise False.

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

valphor-1.0.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

valphor-1.0.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file valphor-1.0.0.tar.gz.

File metadata

  • Download URL: valphor-1.0.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for valphor-1.0.0.tar.gz
Algorithm Hash digest
SHA256 66a8d4a9b569fcf97022acd3878a6dfc4d28bac9da8b7eb588f1884484dd2e86
MD5 a245b49fa806cc5e8c71065eea90a839
BLAKE2b-256 9307569e99a549e5c4bf3118f31baf375c2a6df45d8036c45d1a8f0e2ee34837

See more details on using hashes here.

File details

Details for the file valphor-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: valphor-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for valphor-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51a29b89720ae14fade93a13d9ad5ef26509bfe652f166dc56a05270f7ef3f8e
MD5 8caf462c370fe315d7159b17680c98f4
BLAKE2b-256 97aa93fc2487c8d377460c7bb6a62c216e5b7ab29e1b4e2a52aa718a715d37c8

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