Skip to main content

Different functions to convert between hex, dec bin etc.

Project description

Description

Different functions to convert between hex, dec, bin, ascii etc.

Installation

pip install cnvrtr

Usage

from cnvrtr.Converter import Converter

cnvrtr = Converter(nonAsciiPlaceholder=".")

leHex = cnvrtr.toLittleEndian("af d0 fe")
# fed0af

hexToBin = cnvrtr.hexToBin("fed0af")
# 111111101101000010101111

hexToDec = cnvrtr.hexToDec("fed0af")
# 16699567

binToDec = cnvrtr.binToDec("11010101")
# 213

decToAscii = cnvrtr.decToAscii(65)
# A

hexToAsciiString = cnvrtr.hexToAsciiString("68656c6c6f20776f726c64")
# hello world

hexToAsciiString = cnvrtr.hexToAsciiString("68656c6c6f20016f726c64")
# hello .orld

License

MIT

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

cnvrtr-1.1.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

cnvrtr-1.1.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file cnvrtr-1.1.1.tar.gz.

File metadata

  • Download URL: cnvrtr-1.1.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for cnvrtr-1.1.1.tar.gz
Algorithm Hash digest
SHA256 45abe515a2f1135e37b5d9606a5c25b350e634bcdbcf96cbbc629c900820c9fe
MD5 4072c3fea9a10493a46ed2db2ea94c96
BLAKE2b-256 09abcff61291dcdec74b073c7f38241cd58cb943ee044e5bd339cb1952a422c0

See more details on using hashes here.

File details

Details for the file cnvrtr-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: cnvrtr-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for cnvrtr-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cda0369103118778471161cd30f1edaa1a4d17188861b25524ba42c4b7e5f564
MD5 fbb254a15e566190f28baf43fdb2fbd7
BLAKE2b-256 dced9f701dd4e40c540a59fc4c7d8bfc65cf02643b5f652da237989f4136bf7a

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