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

Usage

Encrypting Hex Strings

Define a DES object while passing in your key. The key can be a hex string or a bytes object.

import des_Py
des = des_Py.DES("0x133457799bbcdff1")

You can encrypt by calling encrypt() and passing in a hex string or bytes object.

des.encrypt("0x0123456789abcdef")    # -> "0x85e813540f0ab405fdf2e174492922f8"

You can simarly decrypt by calling decrypt() and passing in a hex string or bytes object.

des.decrypt("0x85e813540f0ab405fdf2e174492922f8")    # -> "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.7.tar.gz (20.2 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.7-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file des_purepy-1.0.7.tar.gz.

File metadata

  • Download URL: des_purepy-1.0.7.tar.gz
  • Upload date:
  • Size: 20.2 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.7.tar.gz
Algorithm Hash digest
SHA256 987672842117f90b57e0d9c7a06103a5d45c74062893d62a2857eb4427f7d58d
MD5 135e67e4591872ffa69e771b39f9f0fd
BLAKE2b-256 1d2db0abf170cc006ae058af32bfec55be4f677cebe07bbc2f98a108d36d21fc

See more details on using hashes here.

File details

Details for the file des_purepy-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: des_purepy-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 18.5 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3e4bf629d99ce5b035a33c58dd55d5ab4694acf21a9e616ad18968b65cbd22be
MD5 dc82a1f2308e311ae59fa8d598d8dd8e
BLAKE2b-256 4402b73625d60ede1bedc242dec6d33716baefec9264fc5c02b5566573d3c295

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