Encoding
Hex

🔢 Hexadecimal encoding and decoding.

Syntax

import { hex } from '@opentf/std';
 
hex: {
  encode: (input: string | Uint8Array) => string;
  decode: (input: string) => string;
}

Examples

hex.encode('hello') //=> '68656c6c6f'
hex.decode('68656c6c6f') //=> 'hello'

Related

Try