A pure python implementation of DES
Project description
DES-Python
Data Encryption Standard (DES) implemented in pure Python
Installation
Install using your Python package manager of choice:
pip install des_Py
Plaintext: 0x0123456789abcdef
Key: 0x133457799bbcdff1
Ciphertext: 0x85e813540f0ab405
Decrypted text: 0x0123456789abcdef
Usage
1. DES
Define a DES object while passing in your key. Key should be a hex string representing an 8 byte hexadecimal number.
import des_Py
des = des_Py.DES("0x133457799bbcdff1")
You can encrypt by calling encrypt() and passing in a hex string representing an 8 byte hexadecimal number
des.encrypt("0x0123456789abcdef") # -> "0x85e813540f0ab405"
You can simarly decrypt by calling decrypt() and passing in a hex string to decrypt
des.decrypt("0x85e813540f0ab405") # -> "0x0123456789abcdef"
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file des_purepy-1.0.6.tar.gz.
File metadata
- Download URL: des_purepy-1.0.6.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3165f4014f851979d9cd2259c7d3012cbc3f3da12bba2d52e9e5644af246e1e
|
|
| MD5 |
e7229b9556a35f8e3dc72e1bcc58bf76
|
|
| BLAKE2b-256 |
6d696248f7feeb09c786ea0db5ba11e5f9b6e8c23904be651b95718d0f44ed08
|
File details
Details for the file des_purepy-1.0.6-py3-none-any.whl.
File metadata
- Download URL: des_purepy-1.0.6-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad85191ce4a436b4aa57ebb360faad7a64441df72f943cd117d6d98b7361c831
|
|
| MD5 |
c62fca019713b03f9889e3618d93354b
|
|
| BLAKE2b-256 |
2bb91c72c2092370e638f63ffa752407640d6d325d316cb3c4565c05e1e801b5
|