ConversionHelper

public class ConversionHelper

Helper class for converting data types.

  • Convert Data to String in hex notation.

    Declaration

    Swift

    public static func byteToHexString(bytes: Data) -> String
  • Convert Data to String in hex notation. If bytes is nil returns empty string.

    Declaration

    Swift

    public static func byteOrNullToHexString(bytes: Data?) -> String
  • Convert String in hex notation to Data. Invalid characters are assumed to be 0.

    Declaration

    Swift

    public static func hexStringToByte(string: String) -> Data