Structure
JWK
A JSON Web Key.
struct JWK
Overview
Read specification (RFC 7517) https://tools.ietf.org/html/rfc7517.
Topics
Initializers
init(from: any Decoder) throwsCreates a new instance by decoding from the given decoder.init(json: String) throws
Instance Properties
var algorithm: JWK.Algorithm?Thealg(algorithm) parameter identifies the algorithm intended for use with the key. Thealgvalue is a case-sensitive ASCII string.var curve: JWK.Curve?var exponent: String?eExponent.var keyIdentifier: JWKIdentifier?Thekid(key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover.var keyType: JWK.KeyTypeThekty(key type) parameter identifies the cryptographic algorithm family used with the key, such asRSAorECDSA. Thektyvalue is a case-sensitive string.var modulus: String?nModulus.var privateExponent: String?dPrivate exponent.var x: String?var y: String?
Type Methods
static func ecdsa(JWK.Algorithm?, identifier: JWKIdentifier?, x: String?, y: String?, curve: ECDSAKey.Curve?, privateKey: String?) -> JWKstatic func octetKeyPair(JWK.Algorithm?, identifier: JWKIdentifier?, x: String?, y: String?, curve: EdDSAKey.Curve?, privateKey: String?) -> JWKstatic func rsa(JWK.Algorithm?, identifier: JWKIdentifier?, modulus: String?, exponent: String?, privateExponent: String?) -> JWK
Enumerations
enum AlgorithmSupportedalgalgorithmsenum Curveenum KeyTypeSupportedktykey types.
Relationships
Conforms To
Swift.DecodableSwift.Encodable