EXTENSION

StringProtocol

public extension StringProtocol

Properties

sha256Hex

var sha256Hex: String

Returns a SHA256 in hexadecimal as a String.

dataUtf8Encoding

var dataUtf8Encoding: Data

Returns a Data format by using .utf8 encoding.

base64URLEncodedStringOfSHA256Hash

var base64URLEncodedStringOfSHA256Hash: String

Returns a Base64URLEncodedString of a SHA256 hash of the String.

String -> Data -> SHA256 Hash -> Base64URLEncodedString