A Python module to generate and verify security keys for unique identification
Project description
securitykey
securitykey is a lightweight Python module to generate, store, and verify security keys easily.
Features
- Generate random security keys with customizable length
- Store keys in memory during runtime
- Verify keys against stored keys
Installation
You can install the module via pip (once published):
pip install securitykey
Usage
python
Copy
Edit
import securitykey
# Generate a new key and key ID
keyid, key = securitykey.generateKey()
print(f"Generated Key ID: {keyid}")
print(f"Generated Key: {key}")
# Store the key in memory
securitykey.storeKey(keyid, key)
# Verify the key later
is_valid = securitykey.verifyKey(keyid, key)
print("Key is valid:", is_valid)
Functions
generateKey(keyid="", key="", keyLength=16, idLength=8)
Generates a new key ID and key. You can provide your own or generate random ones.
storeKey(keyid, key)
Stores the key in memory for later verification.
verifyKey(keyid, some_key)
Verifies if the given key matches the stored key ID.
License
MIT License
Made by JTCoder8290
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
securitykey-0.3.4.tar.gz
(2.3 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 securitykey-0.3.4.tar.gz.
File metadata
- Download URL: securitykey-0.3.4.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
814025719136d3a543fdfe43f57fd2760ae3cc457be9a49f9cfe0170bae3ad2a
|
|
| MD5 |
007e050d8c82224545d46dca5d7d0924
|
|
| BLAKE2b-256 |
71a4029dd8cb01078693a8dc80cd1c2c345d4d39758006c3c2998a032de2f3a9
|
File details
Details for the file securitykey-0.3.4-py3-none-any.whl.
File metadata
- Download URL: securitykey-0.3.4-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0806b4f3e6eebc2dd68d549d0f5ac8c911a1cfa0410bb5d1f5eb6d6c393be1f3
|
|
| MD5 |
f9884a95e1ee6f35cc30e8e2d5eb8f65
|
|
| BLAKE2b-256 |
cbe6bcd4137a6b50bc88d0a32c0ba38e63abee193f28e4a457f339a315b6e728
|