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) throws -> String
-
Convert Data to String in hex notation. If bytes is nil returns empty string.
Declaration
Swift
public static func byteOrNullToHexString(bytes: Data?) throws -> String
-
Convert Data to String in hex notation. If bytes is nil returns empty string.
Declaration
Swift
public static func byteOrNullToHexStringNoThrow(bytes: Data?) -> String
-
Map to string.
Declaration
Swift
public static func toString(map: [String : Data]) -> String
-
Convert Data to String in base64 notation.
Declaration
Swift
public static func byteToBase64String(bytes: Data) throws -> String
-
Convert Data to String in base64 notation. If bytes is nil returns empty string.
Declaration
Swift
public static func byteOrNullToBase64String(bytes: Data?) throws -> String
-
Convert String in hex notation to Data. Invalid characters are assumed to be 0.
Declaration
Swift
public static func hexStringToByte(string: String) -> Data
-
Convert String in base64 notation to Data. Invalid characters are assumed to be 0.
Declaration
Swift
public static func base64StringToByte(string: String) -> Data