PrivMX DOCS
API Reference/PrivMX Endpoint Swift/Core

Base64

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

Static Methods

encode(data:)

Encodes buffer to a string in Base64 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(base64_data:)

Decodes string in Base64 to buffer.

Params

base64_data

std.string

string to decode

public static func decode(
base64_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 Base64 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