Skip to main content

A pure python implementation of DES

Project description

DES-Python

made-with-python license: AGPL-3.0 DES-Python

Data Encryption Standard (DES) implemented in pure Python

Demo

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

des_purepy-1.0.6.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

des_purepy-1.0.6-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

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

Hashes for des_purepy-1.0.6.tar.gz
Algorithm Hash digest
SHA256 d3165f4014f851979d9cd2259c7d3012cbc3f3da12bba2d52e9e5644af246e1e
MD5 e7229b9556a35f8e3dc72e1bcc58bf76
BLAKE2b-256 6d696248f7feeb09c786ea0db5ba11e5f9b6e8c23904be651b95718d0f44ed08

See more details on using hashes here.

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

Hashes for des_purepy-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ad85191ce4a436b4aa57ebb360faad7a64441df72f943cd117d6d98b7361c831
MD5 c62fca019713b03f9889e3618d93354b
BLAKE2b-256 2bb91c72c2092370e638f63ffa752407640d6d325d316cb3c4565c05e1e801b5

See more details on using hashes here.

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