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.8.tar.gz (490.4 kB 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.8-cp38-abi3-win_amd64.whl (1.0 MB view details)

Uploaded CPython 3.8+Windows x86-64

ciphertoken-0.1.8-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.8-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.8.tar.gz.

File metadata

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

File hashes

Hashes for ciphertoken-0.1.8.tar.gz
Algorithm Hash digest
SHA256 66863967f27f9c9a1ebafa38f1ed6b0486ee4fa80eaf93e429a28e952ff23ac1
MD5 8dfe025ca8062d4a2a8a9810095cfcce
BLAKE2b-256 31aa40987bf182ae55f48e9cd64e4b357360c0ce21f6296b3c562d76150be915

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciphertoken-0.1.8.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.8-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: ciphertoken-0.1.8-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.8-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 72231c9668e51c291b18d7ac4bfb51dfdccc6078390bbcee4e9db083183c9001
MD5 2f9c50974e2007907cd8fa4be9201d59
BLAKE2b-256 0e46be98da08d8b6e94ff5dd8e6f9b4bbeae1f352ce7075b24c1d56b2a4be7ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciphertoken-0.1.8-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.8-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ciphertoken-0.1.8-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 979add628c2168771e88e3c72b05e5d8eba76886a84354409a7999f009bde878
MD5 3592eb1a850a61b44f9e32f410ea4b87
BLAKE2b-256 b7bd7b2d89fdd98ce7366f3586931c56cbb745fa31dceddb4fec99f2da36b335

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciphertoken-0.1.8-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.8-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ciphertoken-0.1.8-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 12b73e0881aae75972f802551142594786da92cd558a208c50c17470acd283ff
MD5 5ae4b82fbe59fb89579ac8a4c9081c78
BLAKE2b-256 0cdc972e35154894bfa5eae3f513688f523c7294a6790e88d9a0b2c734d0a51a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ciphertoken-0.1.8-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