Skip to content

Simplifies encoding sensitive data like emails URL-safe tokens.

License

Notifications You must be signed in to change notification settings

laonan/urltoken

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simplifies encoding sensitive data like emails URL-safe tokens.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages