PrivMX DOCS
API Reference/PrivMX Endpoint Swift/Core

Hex

Contains helper methods to convert between Buffers and Hex-encoded std.strings.

Static Methods

encode(data:)

Encodes buffer to a string in Hex format.

Params

data

privmx.endpoint.core.Buffer

buffer to encode

public static func encode(
data: privmx.endpoint.core.Buffer
) throws -> std.string

Returns

std.string · string in Hex format

decode(hex_data:)

Decodes string in Hex to buffer.

Params

hex_data

std.string

string to decode

public static func decode(
hex_data: std.string
) throws -> privmx.endpoint.core.Buffer

Returns

privmx.endpoint.core.Buffer · buffer with decoded data

is(data:)

Checks if given string is in Hex format.

Params

data

std.string

string to check

public static func `is`(
data: std.string
) throws -> Bool

Returns

Bool · check result

We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.

PrivMX Endpoint Swift v2.3

This package is not up to date with the core documentation. Some of the features you've seen described in other parts of the documentation might not be mentioned here. Those changes do not influence compatibility, however