otupy.types.base.binary_x.Binaryx

class Binaryx(b=None)

Bases: Binary

OpenC2 Binary HEX data

Binary data that are expected to be encoded with hex as defined in [RFC4648], Section 8 (Sec. 3.1.5).

Methods

fromdict

Builds from base64encoding

get

set

Set the value internally and covert it, if necessary.

todict

Encodes with base64

__init__(b=None)

Initializes from bytes, Binary, base64 strings, or null

classmethod fromdict(dic, e=None)

Builds from base64encoding

Parameters:
  • dic – The intermediary dictionary representation from which the object is built.

  • e – The Encoder that is being used.

Returns:

An instance of this class initialized from the dictionary values.

set(b)

Set the value internally and covert it, if necessary. Accepted data: bytes, hex strings, Binary, Binaryx.

todict(e=None)

Encodes with base64

Parameters:

e – The Encoder that is being used.

Returns:

A dictionary compliants to the Language Specification’s serialization rules.