PrivMX DOCS
API Reference/PrivMX Endpoint Swift Extra/Extensions

PrivMXCryptoExtensions

Protocol declaring cryptographic operations using Swift types.

Methods

signBase64(data:key:)

Signs the provided Base64-encoded string using the given key. This function converts the input string to Data using UTF-8 encoding, signs the data using the provided key, and returns the signature as a Base64-encoded string.

Params

data

String

The input string to be signed, which will be converted to Data using UTF-8 encoding.

key

String

The key used to sign the input data.

func signBase64(
data: String,
key: String
) throws -> String

Returns

String · A Base64-encoded string representing the signature of the input data.

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.