From Hex

Category: Encoding

Status: Registered and callable in the CyberChef 11.3.0 compatibility inventory.

Input / output: string → byteArray

Background: https://wikipedia.org/wiki/Hexadecimal

What it does

Converts a hexadecimal byte string back into its raw value. e.g. ce 93 ce b5 ce b9 ce ac 20 cf 83 ce bf cf 85 0a becomes the UTF-8 encoded string Γειά σου

Note

Status here means the operation name is implemented and callable. It does not by itself promise byte-for-byte parity for every upstream option. See Compatibility and current status for the verified scope and known boundaries.

Arguments and options

Arguments are positional. Keep their order when using bake() or Pipeline.then().

Index

Name

UI type

PyChef default

Accepted values / format

0

Delimiter

option

'Auto'

'Auto', 'Space', 'Percent', 'Comma', 'Semi-colon', 'Colon', 'Line feed', 'CRLF', '0x', '0x with comma', '\\x', 'None'

Working recipe example

from pychef import bake

input_value = "41 42 43"
args = ['Auto']
result = bake(input_value, [{"op": 'From Hex', "args": args}])
print(result)

Expected representation: b'ABC'.

Pipeline example

from pychef import Pipeline

args = ['Auto']
transform = Pipeline().then('From Hex', *args)
result = transform("41 42 43")

Dedicated operation module

The registered entry point lives in pychef.operations.by_operation.from_hex. Direct calls receive the input value and a positional argument tuple:

from pychef.operations.by_operation.from_hex import run

result = run("41 42 43", tuple(['Auto']))
pychef.operations.by_operation.from_hex.run(value, args)

Run this operation using its shared internal implementation.

Parameters:
  • value (str | bytes)

  • args (Sequence[Any])

Return type:

str | bytes