HmacAlgorithm

public enum HmacAlgorithm : Int

The enumerated type that provides access to a number of HMAC algorithms.

Supported algorithms

SHA1 HMAC with SHA1 digest.

SHA256 HMAC with SHA256 digest.

SHA512 HMAC with SHA512 digest.

  • SHA1 HMAC with SHA1 digest.

    Declaration

    Swift

    case sha1
  • SHA256 HMAC with SHA1 digest.

    Declaration

    Swift

    case sha256
  • SHA512 HMAC with SHA1 digest.

    Declaration

    Swift

    case sha512
  • Initializes the HmacAlgorithm using the algorithm name.

    Declaration

    Swift

    public init?(name: String)

    Parameters

    name

    The name of the algorithm.

    Return Value

    The HmacAlgorithm for the algorithm name or nil.

  • Return the string value of the HmacAlgorithm enumerated type.

    Declaration

    Swift

    public static func getAlgorithmName(_ algorithm: HmacAlgorithm) -> String

    Parameters

    algorithm

    The HmacAlgorithm enumerated type.

    Return Value

    String value.