Skip to main content

High-performance token and crypto utilities written in Rust with PyO3

Project description

CipherToken

CipherToken is a next-generation token engine built for developers who demand speed, security, and reliability. Currently focused on JWT, it provides a complete token lifecycle — from key generation and token minting to verification, rotation, and expiry tracking — all backed by the raw performance of Rust.

  • Python 3.8+
  • HMAC, RSA, ECDSA, RSA-PSS, EdDSA
  • Sync and Async APIs via Tokio

Built by Cipher-Unit.


Documentation

📖 Official Documentation: https://cipherunits.github.io/CipherToken/


Installation

pip install ciphertoken

Quick Example

from ciphertoken import CipherToken
from ciphertoken.algorithms import HS256
from ciphertoken.time import minutes, days
from ciphertoken.jwt import access, refresh, rotation

token = CipherToken(
    secret="your-strong-secret-key",
    algorithm=HS256,
    access_ttl=minutes(10),
    refresh_ttl=days(7),
)

access_token = access(token, payload={"user_id": 42})
refresh_token = refresh(token, payload={"user_id": 42})
new_access, new_refresh = rotation(token, refresh_token)

print(token.verify(access_token))  # True
print(token.decode(access_token))

Contribute

Contributions are welcome! Whether it's bug fixes, new algorithms, documentation improvements, or feature suggestions — feel free to open an issue or pull request.

Please read the code of conduct and contribution guidelines before submitting. All contributions must follow the MIT license.


License

MIT — see LICENSE for details.

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

ciphertoken-0.1.7.tar.gz (3.7 MB view details)

Uploaded Source

Built Distributions

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

ciphertoken-0.1.7-cp38-abi3-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.8+Windows x86-64

ciphertoken-0.1.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

ciphertoken-0.1.7-cp38-abi3-macosx_11_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

Details for the file ciphertoken-0.1.7.tar.gz.

File metadata

  • Download URL: ciphertoken-0.1.7.tar.gz
  • Upload date:
  • Size: 3.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ciphertoken-0.1.7.tar.gz
Algorithm Hash digest
SHA256 9cf48e119abfff2481f0bbf17572b470fec353797ac557a84f6b61d822519a1c
MD5 6679b8c990df17a7d646e8890d42d470
BLAKE2b-256 5a83561324dbf600d76ab3023c677a8ddd99ac4ae6c7cf77641db6526696f444

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciphertoken-0.1.7.tar.gz:

Publisher: build.yml on cipherunits/CipherToken

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ciphertoken-0.1.7-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: ciphertoken-0.1.7-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ciphertoken-0.1.7-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 14b774071f52d81274bda7e4505b6567e6cd4416051592461803980890942380
MD5 9abce6b2cd2e812e9af5ef4e453f48a8
BLAKE2b-256 192a97c156bec64ddc6b684201d1501920d3fdbb58849eb7c84a29a01b2db01f

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciphertoken-0.1.7-cp38-abi3-win_amd64.whl:

Publisher: build.yml on cipherunits/CipherToken

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ciphertoken-0.1.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ciphertoken-0.1.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9a47143bb3a1bf7aaf16911f13d4ee7a8c24a808636e20a4d54c3db39665503a
MD5 b6d763baca8e1a7a20882a8ea861b1a3
BLAKE2b-256 7a4af6dfeb9cda82eeb3bb96d6e2f1ac5db3ee78da08c31f56447e50a13f4db0

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciphertoken-0.1.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build.yml on cipherunits/CipherToken

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ciphertoken-0.1.7-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ciphertoken-0.1.7-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0455d1de72e9c6b995b138ca2aa3c6690bb4e72b38c30de7c2fbae8f088a1547
MD5 59080942ec9b6fc94abf5d2be7c4d6a6
BLAKE2b-256 30569ee6c8157f2a78d800af886b4825957d5fe2580c35443e1f6d8e0953fd9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciphertoken-0.1.7-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: build.yml on cipherunits/CipherToken

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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