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.2.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.2-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: securitykey-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 9d8d8e1d81a45d19d931c223fb95220d907a1652889771f9d06d77dbf268daf4
MD5 e2e450956abc09530e68d7182dc90783
BLAKE2b-256 e2bee134e0c1861a2ee348e5618c9545152d29276453df3fb106254fa5991870

See more details on using hashes here.

File details

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

File metadata

  • Download URL: securitykey-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6ee47e01dc75dc54560979394d9949ab95b0f771897ac02f24c64807360d76ae
MD5 b40647037cf972cc70159d3a8a23a0b1
BLAKE2b-256 3d514a978b24ebd527a735690cc2068dc5e48f41f6576b0d24458502aa75f2a0

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