Utils

public class Utils

Class with utility functions required in TK App or SDK.

    • Utility function that returns opaque bytes in Data format from HEX digits. *

    Declaration

    Swift

    public static func dataWithHexString(_ hex: String) -> Data

    Return Value

    Opaque bytes in Data format

    • Utility function that returns a String with the HEX digits from data. *

    Declaration

    Swift

    public static func hexadecimalString(_ data: Data) -> String

    Return Value

    Hexadecimal string

    • Calculate the SHA256 digest

    Declaration

    Swift

    public static func sha256(_ data: Data) -> Data

    Return Value

    32-byte SHA256 digest of data