ExternalSender
open class ExternalSender : ExternalSenderProtocol, @unchecked Sendable
extension ExternalSender: Equatable
A RFC 9420 External Sender
This can be used to initialize a subconversation.
-
Parse an external sender.
This first attempts to parse this as a JWK per
parse_jwk, and falls back toparse_public_keyif the former method fails.Declaration
Swift
public static func parse(key: Data, signatureScheme: SignatureScheme) throws -> ExternalSender -
Parse an external sender given a JWK.
This expects a raw json serialized JWK. It works with any Signature scheme.
Declaration
Swift
public static func parseJwk(jwk: Data) throws -> ExternalSender -
Parse an external sender given a raw public key.
This supports the legacy behaviour where the server was providing the external sender public key raw.
Declaration
Swift
public static func parsePublicKey(key: Data, signatureScheme: SignatureScheme) throws -> ExternalSender -
Serialize this external sender into a byte vector.
This produces the public key and matches
parse_public_key.Declaration
Swift
open func serialize() -> Data -
Declaration
Swift
public static func == (self: ExternalSender, other: ExternalSender) -> Bool