Skip to main content

A pure-python implementation of the Damm Algorithm, base 32

Project description

Damm32

CircleCI

Python implementation of the Damm Algorithm in Base 32

By default, it uses an alphabet as specified in RFC 4648 which contains 32 alphanumeric characters, with similar looking characters removed. The padding symbol is not included.

Installation

The package is available on PyPI and can be installed using pip.

pip install damm32

Alternatively, you can clone the repository and use the module.

Usage

The module contains a single class called Damm32, this class implements the methods for the checksum.

from damm32 import Damm32

d32 = Damm32()

digit = d32.calculate("HELLO")

d32.verify("HELLO" + digit)

You can also pass an list of length 32 to the constructor for the class to specify your alphabet.

from damm32 import Damm32

d32 = Damm32(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '2', '3', '4', '5', '6', '7'])

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

damm32-0.0.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

damm32-0.0.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file damm32-0.0.2.tar.gz.

File metadata

  • Download URL: damm32-0.0.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for damm32-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c07ab08c12e58879cab9e1b263aa92a998a15decfb6adf6521cc45d7b2f1a02e
MD5 06d77cbfc66f81bc801ff7a690cc1bda
BLAKE2b-256 3a7951cf9ece2391957250795249ac7fb5ea636576a6f2e0ffe48519c1dbad58

See more details on using hashes here.

File details

Details for the file damm32-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: damm32-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for damm32-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 43840e6b0aa583b1e565099ecd936e84e91181658d0879a2611e57295885a154
MD5 1ed1696eb4627f5ec7fcabd4e302f29a
BLAKE2b-256 8bfb64574e4c9c8c8dc2e90a34c3700eed937d6e22809d28ab4f96f44b4521c2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page