init(_:)
Construct a public key wrapping an Ed25519 public key.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
init(_ ed25519: Curve25519.Signing.PublicKey)
Parameters
- ed25519
The Ed25519 public key to wrap.
Construct a public key wrapping an Ed25519 public key.
init(_ ed25519: Curve25519.Signing.PublicKey)
s4X50911CertificateV9PublicKeyVyAE6Crypto10Curve25519O7SigningOADVcfc
What are these?1DLM2
The Ed25519 public key to wrap.
import X509
A library for working with X.509 certificates.
struct PublicKey
A public key that can be used with a certificate.
struct Certificate
enum Curve25519
An elliptic curve that enables X25519 key agreement and Ed25519 signatures.
enum Signing
A mechanism used to create or verify a cryptographic signature using Ed25519.
struct PublicKey
A Curve25519 public key used to verify cryptographic signatures.
init(_ rsa: _RSA.Signing.PublicKey)
Construct a public key wrapping a RSA public key.
init(_ p256: P256.Signing.PublicKey)
Construct a public key wrapping a P256 public key.
init(_ p384: P384.Signing.PublicKey)
Construct a public key wrapping a P384 public key.
init(_ p521: P521.Signing.PublicKey)
Construct a public key wrapping a P521 public key.
init(derEncoded: SwiftASN1.ASN1Node, withIdentifier identifier: SwiftASN1.ASN1Identifier) throws
static var defaultIdentifier: SwiftASN1.ASN1Identifier { get }
static var defaultPEMDiscriminator: String { get }
var description: String { get }
var subjectPublicKeyInfoBytes: ArraySlice<UInt8> { get }
The byte array of the public key used in the certificate.
func isValidSignature(_ signature: Certificate.Signature, for csr: CertificateSigningRequest) -> Bool
Confirms that signature
is a valid signature for csr
, created by the private key associated with this public key.
func isValidSignature(_ signature: Certificate.Signature, for certificate: Certificate) -> Bool
Confirms that signature
is a valid signature for certificate
, created by the private key associated with this public key.
func serialize(into coder: inout SwiftASN1.DER.Serializer, withIdentifier identifier: SwiftASN1.ASN1Identifier) throws