Skip to content

Latest commit

 

History

History
37 lines (22 loc) · 1.13 KB

README.md

File metadata and controls

37 lines (22 loc) · 1.13 KB

urltoken

Description

URL Token Encoder simplifies encoding sensitive data like emails and usernames into URL-safe tokens. Unlike encryption, it preserves data integrity for easy retrieval. Ideal for securing information in URLs without encryption complexities.

You can put the encoded token in the URL, and when you need to retrieve the original data, you can decode the token to get the original data.

Features:

  • Encode sensitive content into URL-safe tokens.
  • Lightweight and easy integration into Python apps.
  • Simplifies data security in web apps and APIs.
  • Check if the token is generated by the same secret key.

Installation

pip install urltoken

Usage

from urltoken.encoder import UrlTokenEncoder

encoder =  UrlTokenEncoder('yoursecretkey')
token = encoder.encode('[email protected]')
print(token)

decoded = encoder.decode(token)
print(decoded)

Warning

!!! This library is not intended for encrypting sensitive data, if you need to encrypt data, use a proper encryption library, like cryptography or pycryptodome.

Issues

https://github.com/laonan/urltoken/issues