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.1.0.tar.gz
(4.0 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.1.0.tar.gz.
File metadata
- Download URL: valphor-1.1.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6090cce1475c54606a254fa2762814965cca327d22f0a3b1e3a448ad8f8090e6
|
|
| MD5 |
015437b6765d406f9b10f42b679c3ab0
|
|
| BLAKE2b-256 |
edc56bbcfb3f4a96c3c70c0928564c5e8e4face86e517246bc2af27f58fe449e
|
File details
Details for the file valphor-1.1.0-py3-none-any.whl.
File metadata
- Download URL: valphor-1.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 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 |
755e72681a42fc2a94b6ac2285764edde416fd8809c07dbf2f30f9ccb1ec5818
|
|
| MD5 |
ad5ff38bb0f7e5225b599adc737b5614
|
|
| BLAKE2b-256 |
b7e08517b29314985b2fa3de2d00e2e6c82dc43f6ad603644440a14ababe206f
|