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.
Thecostparameter 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 inputverify_strusing the Valphor algorithm with the providedsalt.
Thelengthparameter 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 providedverify_strmatches the givenhashedvalue using the Valphor verification process.
ReturnsTrueif the verification succeeds, otherwiseFalse.
Project details
Release history Release notifications | RSS feed
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.1.tar.gz
(3.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file valphor-1.0.1.tar.gz.
File metadata
- Download URL: valphor-1.0.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a348d7dbc66f580c830dbe54dca62af3c13c8a45359efb86d40c172ac0306a1
|
|
| MD5 |
6d3977546df7732a7ada16b5503ee52e
|
|
| BLAKE2b-256 |
ae96cd038c15e9d00abdbede8269c52605abf50ed49a5e348be073a7a4aae26f
|
File details
Details for the file valphor-1.0.1-py3-none-any.whl.
File metadata
- Download URL: valphor-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b9a4f13f550028a9c16bb3a76dc8e9fca38bbf18f2317a79b0a88e341c247ea
|
|
| MD5 |
9ecc90d9717a94ac4586b3c62895983e
|
|
| BLAKE2b-256 |
c2670920b11db0d5102d2a065d590ddb2268bcb6172aafd9667ca62392ba59a0
|