For the latest stable version, please use Botan 1.1!

botan.hex_decode

Synopsis

local botan = require "botan"

botan.hex_decode(out_buffer: byte_span, input: byte_span|string, ignore_ws: boolean = true) -> byte_span (1)
botan.hex_decode(input: byte_span|string, ignore_ws: boolean = true) -> byte_span (2)
botan.hex_decode_locked(input: byte_span|string, ignore_ws: boolean = true) -> secure_byte_span (3)

Description

Perform hex decoding.

If provided, out_buffer should have at least (#input / 2 + #input % 2) bytes.