Next | Previous

Functions

convert.hex_to_bytes(str)

Converts hexadecimal string of any length to bytes.

  • @params:
    • string str
  • @returns: bytes
convert.bytes_to_hex(data)

Converts binary data (byes) of any length to hexadecimal string representation.

  • @params:
    • bytes data
  • @returns: string
convert.decimal_to_hex(n)

Converts the given decimal based number to an hexadecimal string.

  • @params:
    • number n
  • @returns: string
convert.hex_to_decimal(str)

Converts the given hexadecimal string to a decimal base 10 number.

@notes:

  • string must either contain the plain hexadecimal string or be in the format 0x[hex string].
  • @params:
    • string str
  • @returns: number
convert.unicode_to_hex(chr)

Converts a unicode character to it's equivalent hexadecimal string.

  • @params:
    • char chr
  • @returns: string
convert.bytes_to_decimal(bytes)

Converts a bytes (binary data) to a decimal number.

  • @params:
    • bytes bytes
  • @returns: number