init(_:)
Construct a public key wrapping a P384 public key.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
init(_ p384: P384.Signing.PublicKey)
Parameters
- p384
The P384 public key to wrap.
Construct a public key wrapping a P384 public key.
init(_ p384: P384.Signing.PublicKey)
s4X50911CertificateV9PublicKeyVyAE6Crypto4P384O7SigningOADVcfc
What are these?93N9E
The P384 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 P384
An elliptic curve that enables NIST P-384 signatures and key agreement.
enum Signing
A mechanism used to create or verify a cryptographic signature using the NIST P-384 elliptic curve digital signature algorithm (ECDSA).
struct PublicKey
A P-384 public key used to verify cryptographic signatures.
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(_ 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