PublicKey

public struct PublicKey : Codable, Equatable, Hashable

A struct representing a public key.

  • kty

    The key type.

    Declaration

    Swift

    public let kty: String
  • use

    The intended use of the key.

    Declaration

    Swift

    public let use: String
  • alg

    The algorithm used with the key.

    Declaration

    Swift

    public let alg: String
  • kid

    The key identifier.

    Declaration

    Swift

    public let kid: String
  • crv

    The cryptographic curve.

    Declaration

    Swift

    public let crv: String
  • x

    The x-coordinate of the key.

    Declaration

    Swift

    public let x: String
  • y

    The y-coordinate of the key.

    Declaration

    Swift

    public let y: String
  • Initializes a new PublicKey instance.

    Declaration

    Swift

    public init(
        kty: String,
        use: String,
        alg: String,
        kid: String,
        crv: String,
        x: String,
        y: String
    )

    Parameters

    kty

    The key type.

    use

    The intended use of the key.

    alg

    The algorithm used with the key.

    kid

    The key identifier.

    crv

    The cryptographic curve.

    x

    The x-coordinate of the key.

    y

    The y-coordinate of the key.

  • Provides a stub instance of PublicKey for testing purposes.

    Declaration

    Swift

    static let stub: PublicKey