Data
public extension Data
extension Data: RequestStringConvertible
-
Undocumented
Declaration
Swift
init?(hexString: String)
-
Calculate the HMAC digest of data.
Declaration
Swift
func hmac(algorithm: CryptoAlgorithm, key: Data) -> DataParameters
algorithmThe HMAC algorithm to use.
keyThe key used to compute the HMAC, in
Dataformat.Return Value
The HMAC digest in
Dataformat. -
Compute the hash function of a string.
Declaration
Swift
func hash(algorithm: CryptoAlgorithm) -> DataParameters
algorithmThe cryptographic algorithm to use.
Return Value
The hash digest in
Dataformat. This can then be converted to a base64 or hex string using thebase64StringorhexStringextension methods. -
Undocumented
Declaration
Swift
public var requestString: String { get } -
Returns the hexadecimal string representation of the data.
Declaration
Swift
func hexadecimalString() -> String -
Returns a Base-64 encoded string, optionally trimming ending
=characters.Declaration
Swift
func base64EncodedString(trimmingEquals: Bool) -> String
View on GitHub
Data Extension Reference