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.3.3.tar.gz (2.3 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.3.3-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: securitykey-0.3.3.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

Hashes for securitykey-0.3.3.tar.gz
Algorithm Hash digest
SHA256 898796d22e5bcf19bddd21902a3f68d11482588cdef6befe0886c407b7964905
MD5 3b64b03cbde6bafc50a944c8eff63faf
BLAKE2b-256 a3747fdf140dfb8684efda80f5a13e5aed529245a45e46b3a2d13284ac8cd6f0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: securitykey-0.3.3-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

Hashes for securitykey-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8bb11f7a2fe1488a5dfa46ba060b50e85c5a939f0c826d049e74cb30ff1b49f0
MD5 dc8d29bac54d18bb7c0b6c42e93987bb
BLAKE2b-256 84a6667a670e8e722f7b85f255a120557a298b52d394f2c09c49143d4ae05c7b

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