https://github.com/muhammedrahil/base64-encoder-and-decoder
A built-in module in Python, the base64 library offers functions for encoding and decoding binary data to and from base64 strings, effectively converting any binary data to plain text. A common encoding method called Base64 converts binary data into a string of printable ASCII characters
https://github.com/muhammedrahil/base64-encoder-and-decoder
base64 decryption django django-framework ecryption python
Last synced: 3 months ago
JSON representation
A built-in module in Python, the base64 library offers functions for encoding and decoding binary data to and from base64 strings, effectively converting any binary data to plain text. A common encoding method called Base64 converts binary data into a string of printable ASCII characters
- Host: GitHub
- URL: https://github.com/muhammedrahil/base64-encoder-and-decoder
- Owner: muhammedrahil
- Created: 2022-10-12T01:08:37.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-03T14:23:58.000Z (over 1 year ago)
- Last Synced: 2025-01-21T01:13:04.929Z (about 1 year ago)
- Topics: base64, decryption, django, django-framework, ecryption, python
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Base64-Encoder-And-Decoder
base64 using Django encrypt and decrypt
A built-in module in Python, the base64 library offers functions for encoding and decoding binary data to and from base64 strings, effectively converting any binary data to plain text. A common encoding method called Base64 converts binary data into a string of printable ASCII characters
```
import base64
```
## encode primary key
```
pk=kwargs.get('pk')
enc = base64.b64encode(str(pk).encode('ascii'))
enc=enc.decode()
```
- eg: MjA=
## decode primary key
```
pk=kwargs.get('pk')
denc = base64.b64decode(pk)
pk = denc.decode('ascii')
```
- eg: 15