pemRepresentation
A Privacy-Enhanced Mail (PEM) representation of the private key.
- iOS
- 13+
- macOS
- 10.15+
- Mac Catalyst
- 13+
- tvOS
- 13+
- visionOS
- 1.0+
- watchOS
- 6+
var pemRepresentation: String { get }A Privacy-Enhanced Mail (PEM) representation of the private key.
var pemRepresentation: String { get }s6Crypto4P521O12KeyAgreementO07PrivateC0V17pemRepresentationSSvp What are these?9EHGBimport CryptoA cryptography library for Swift.
struct PrivateKeyA P-521 private key used for key agreement.
enum P521An elliptic curve that enables NIST P-521 signatures and key agreement.
enum KeyAgreementA mechanism used to create a shared secret between two users by performing NIST P-521 elliptic curve Diffie Hellman (ECDH) key exchange.
@frozen struct StringA Unicode string value that is a collection of characters.
init() Creates a NIST P-521 elliptic curve private key for use with Diffie-Hellman key exchange.
init(compactRepresentable: Bool = true) Creates a random P-521 private key for key agreement.
init<Bytes>(derRepresentation: Bytes) throws where Bytes : RandomAccessCollection, Bytes.Element == UInt8 Creates a P-521 private key for key agreement from a Distinguished Encoding Rules (DER) encoded representation.
init(pemRepresentation: String) throws Creates a P-521 private key for key agreement from a Privacy-Enhanced Mail PEM) representation.
init<Bytes>(rawRepresentation: Bytes) throws where Bytes : ContiguousBytes Creates a P-521 private key for key agreement from a collection of bytes.
init<Bytes>(x963Representation: Bytes) throws where Bytes : ContiguousBytes Creates a P-521 private key for key agreement from an ANSI x9.63 representation.
var derRepresentation: Data { get }A Distinguished Encoding Rules (DER) encoded representation of the private key.
var publicKey: P521.KeyAgreement.PublicKey { get }The corresponding public key.
var rawRepresentation: Data { get }A data representation of the private key.
var x963Representation: Data { get }An ANSI x9.63 representation of the private key.
func sharedSecretFromKeyAgreement(with publicKeyShare: P521.KeyAgreement.PublicKey) throws -> SharedSecret Computes a shared secret with the provided public key from another party.