Skip to main content

A pure-python implementation of the Damm Algorithm in 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.3.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

damm32-0.0.3-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: damm32-0.0.3.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.11 CPython/3.7.2 Linux/5.0.0-arch1-1-ARCH

File hashes

Hashes for damm32-0.0.3.tar.gz
Algorithm Hash digest
SHA256 18c80c89adb5080ecfaf20fb0864fc1dd85f7772754f6825562a5842ec110fc7
MD5 f60970d9d9781c4ad82f6bb8922c5768
BLAKE2b-256 db29f823098ba42191f0ca055ec36748250d1e029957a30a97e9b1b24280ddf3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: damm32-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.11 CPython/3.7.2 Linux/5.0.0-arch1-1-ARCH

File hashes

Hashes for damm32-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9ee95710923b77204a3feb3c3251087b23a8376b96c4a49d490f25a1f53d10c2
MD5 4dccd01ff38374990ae43c0281a549e7
BLAKE2b-256 44f19d70f124967eeeec007293e1f4a77b01b9b509a49f45e58d08c19cfd8889

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