Instance Methodmochidev.swift-webpush 0.4.2WebPush
encode(to:)
Subscriber.swift:117func encode(to encoder: any Encoder) throws
func encode(to encoder: any Encoder) throws
s7WebPush20UserAgentKeyMaterialV6encode2toys7Encoder_p_tKF
What are these?3GMCN
import WebPush
struct UserAgentKeyMaterial
The set of cryptographic secrets shared by the browser (is. user agent) along with a subscription.
protocol Encoder
A type that can encode values into a native format for external representation.
init(from decoder: Decoder) throws
init(publicKey: P256.KeyAgreement.PublicKey, authenticationSecret: Salt)
Initialize key material with a public key and authentication secret from a user agent.
init(publicKey: String, authenticationSecret: String) throws(UserAgentKeyMaterialError)
Initialize key material with a public key and authentication secret from a user agent.
var authenticationSecret: Salt
The authentication secret to validate our ability to send a subscriber push messages.
var publicKey: P256.KeyAgreement.PublicKey
The public key a shared secret can be derived from for message encryption.
static func == (lhs: UserAgentKeyMaterial, rhs: UserAgentKeyMaterial) -> Bool
func hash(into hasher: inout Hasher)
enum CodingKeys
The encoded representation of a subscriber’s key material.
typealias Salt = Data
The underlying type of an authentication secret.