SwiftenumCryptoKit

enum CryptoKit.P521.KeyAgreement
enum CryptoKit.P521.KeyAgreement {
    struct PublicKey {
        var impl: CryptoKit.CoreCryptoNISTCurvePublicKeyImpl<CryptoKit.P521>

        init<A>(derRepresentation: A) throws where A: Swift.RandomAccessCollection, A.Element == Swift.UInt8
        init(pemRepresentation: Swift.String) throws
        init<A>(rawRepresentation: A) throws where A: Foundation.ContiguousBytes
        init<A>(x963Representation: A) throws where A: Foundation.ContiguousBytes
        init<A>(compactRepresentation: A) throws where A: Foundation.ContiguousBytes
        init<A>(compressedRepresentation: A) throws where A: Foundation.ContiguousBytes
        init<A>(_: A, kem: CryptoKit.HPKE.KEM) throws where A: Foundation.ContiguousBytes

        var compactRepresentation: Foundation.Data? {
            get
        }
        var compressedRepresentation: Foundation.Data {
            get
        }
        var derRepresentation: Foundation.Data {
            get
        }
        var pemRepresentation: Swift.String {
            get
        }
        var rawRepresentation: Foundation.Data {
            get
        }
        var x963Representation: Foundation.Data {
            get
        }

        func hpkeRepresentation(kem: CryptoKit.HPKE.KEM) throws -> Foundation.Data
        func keyFromDiversification(with: Foundation.Data, seedExtractionLabel: Foundation.Data) -> CryptoKit.P521.KeyAgreement.PublicKey
    }
    struct PrivateKey {
        let impl: CryptoKit.CoreCryptoNISTCurvePrivateKeyImpl<CryptoKit.P521>

        init<A>(derRepresentation: A) throws where A: Swift.RandomAccessCollection, A.Element == Swift.UInt8
        init(pemRepresentation: Swift.String) throws
        init<A>(rawRepresentation: A) throws where A: Foundation.ContiguousBytes
        init<A>(x963Representation: A) throws where A: Foundation.ContiguousBytes
        init(compactRepresentable: Swift.Bool)
        init(ikm: CryptoKit.SymmetricKey) throws
        init(seed: Foundation.Data, compactRepresentable: Swift.Bool) throws
        init()

        var derRepresentation: Foundation.Data {
            get
        }
        var pemRepresentation: Swift.String {
            get
        }
        var publicKey: CryptoKit.P521.KeyAgreement.PublicKey {
            get
        }
        var rawRepresentation: Foundation.Data {
            get
        }
        var x963Representation: Foundation.Data {
            get
        }

        func sharedSecretFromKeyAgreement(with: CryptoKit.P521.KeyAgreement.PublicKey) throws -> CryptoKit.SharedSecret
        func keyFromDiversification(with: Foundation.Data, seedExtractionLabel: Foundation.Data) -> CryptoKit.P521.KeyAgreement.PrivateKey
    }
}