init(privateKey:)
Initialize a key from a P256 SIgning Private Key.
init(privateKey: P256.Signing.PrivateKey)
Initialize a key from a P256 SIgning Private Key.
init(privateKey: P256.Signing.PrivateKey)
s7WebPush5VAPIDO3KeyV07privateD0AE6Crypto4P256O7SigningO07PrivateD0V_tcfc
What are these?5YZJK
import WebPush
struct Key
Represents the application server’s identification key that is used to confirm to a push service that the server connecting to it is the same one that was subscribed to.
enum VAPID
A set of types for Voluntary Application Server Identification, also known as VAPID.
enum P256
An elliptic curve that enables NIST P-256 signatures and key agreement.
enum Signing
A mechanism used to create or verify a cryptographic signature using the NIST P-256 elliptic curve digital signature algorithm (ECDSA).
struct PrivateKey
A P-256 private key used to create cryptographic signatures.
init()
Create a brand new VAPID signing key.
init(base64URLEncoded: String) throws
Decode a key directly from a Base 64 (URL) encoded string, or throw an error if decoding failed.
init(from decoder: any Decoder) throws
var id: ID { get }
The public key component in a format suitable for user agents to consume.
static func == (lhs: Self, rhs: Self) -> Bool
func encode(to encoder: any Encoder) throws
func hash(into hasher: inout Hasher)
struct ID
The identifier for a private Key
’s public key.