serialize(into:withIdentifier:)
CertificatePublicKey.swift:378- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
func serialize(into coder: inout SwiftASN1.DER.Serializer, withIdentifier identifier: SwiftASN1.ASN1Identifier) throws
func serialize(into coder: inout SwiftASN1.DER.Serializer, withIdentifier identifier: SwiftASN1.ASN1Identifier) throws
s4X50911CertificateV9PublicKeyV9serialize4into14withIdentifiery9SwiftASN13DERO10SerializerVz_AI0jH0VtKF
What are these?2WJ4M
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 DER
DER
defines a namespace that is used to store a number of helper methods and types for DER encoding and decoding.
struct Serializer
An object that can serialize ASN.1 bytes.
struct ASN1Identifier
An ASN1Identifier
is a representation of the abstract notion of an ASN.1 identifier.
init(_ rsa: _RSA.Signing.PublicKey)
Construct a public key wrapping a RSA public key.
init(_ ed25519: Curve25519.Signing.PublicKey)
Construct a public key wrapping an Ed25519 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.