String
extension String: CryptoDigest
Extension for String to return a String containing the digest.
-
Calculates the Message Digest for this string. The string is converted to raw data using UTF8.
Declaration
Swift
public func digest(using algorithm: Digest.Algorithm) -> String
Parameters
algorithm
The digest algorithm to use
Return Value
A hex string of the calculated digest