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

Uploaded Python 3

File details

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

File metadata

  • Download URL: securitykey-0.3.2.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.2.tar.gz
Algorithm Hash digest
SHA256 d3e59996ab1aede3b14fda6b2adcb4dea95a259d5675304a82565fea47809e1d
MD5 6f9c1e78c141424aa0163c828547709b
BLAKE2b-256 cc0d26d2d4a517e1cf079daa763d432a9f5b2fba32742ea9079480ce1dbfcf5b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: securitykey-0.3.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9b230de439e84ac8245b210c0a8865bbf6a7b6b1b0cadf756a14a5764ae9b816
MD5 ef8e31bf46116eafd6416ee40f129f73
BLAKE2b-256 a4f28935eae1ebb7cc1b105895c3b9552d83f9ac15dbf155548ab9d42453fa91

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