String
extension String: LocalizedError
extension String: RequestStringConvertible
-
Declaration
Swift
public var errorDescription: String? { get } -
Undocumented
Declaration
Swift
init?(data: Data?, encoding: Encoding)
-
Calculate the HMAC digest of a string.
Declaration
Swift
func hmac(algorithm: CryptoAlgorithm, key: Data) -> DataParameters
algorithmThe cryptographic 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 } -
Undocumented
Declaration
Swift
func replacing(prefix: String, with newPrefix: String) -> String -
Returns the base64 representation of a string.
Declaration
Swift
func base64EncodedString() -> String
View on GitHub
String Extension Reference