Skip to main content

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.2.1.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

securitykey-0.2.1-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file securitykey-0.2.1.tar.gz.

File metadata

  • Download URL: securitykey-0.2.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for securitykey-0.2.1.tar.gz
Algorithm Hash digest
SHA256 877506be0288dc8648b1ab2e4e071607d40dbc2edc33cc565d5a1d27380349ba
MD5 1efe8693f2792b17585dc8efbccd0d76
BLAKE2b-256 43d4034e81837ea349b37a8865e03d95c20defafb3e046f7544cdbc96320ba95

See more details on using hashes here.

File details

Details for the file securitykey-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: securitykey-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 2.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for securitykey-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c4891032949c6b4912c92e51b52ef1bbe0e7e8e31c8843115ad101496c786130
MD5 c4379066ed5e3170bcd0537e8d0f68c6
BLAKE2b-256 521342b61d6a8e10722d0791395081fbebc287a59588d82b11f297a496bb508e

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