JWTAlgorithm

public enum JWTAlgorithm

Algorithms used for signing JWT

  • Represents SHA256 HMAC Algorithm

    Declaration

    Swift

    case HMACSHA256(secret: Data)
  • Represents SHA384 HMAC Algorithm

    Declaration

    Swift

    case HMACSHA384(secret: Data)
  • Represents SHA512 HMAC Algorithm

    Declaration

    Swift

    case HMACSHA512(secret: Data)
  • Returns the algorithm name

    Declaration

    Swift

    public func alg() -> String
  • Method to sign the given message using the algorithm

    Declaration

    Swift

    public func sign(message: String) -> Data