Instance Propertyswift-crypto 3.12.2Crypto
rawRepresentation
A representation of the Curve25519 public key as a collection of bytes.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
var rawRepresentation: Data { get }
A representation of the Curve25519 public key as a collection of bytes.
var rawRepresentation: Data { get }
s6Crypto10Curve25519O12KeyAgreementO06PublicC0V17rawRepresentation20FoundationEssentials4DataVvp
What are these?9V8AN
import Crypto
A cryptography library for Swift.
struct PublicKey
A Curve25519 public key used for key agreement.
enum Curve25519
An elliptic curve that enables X25519 key agreement and Ed25519 signatures.
enum KeyAgreement
A mechanism used to create a shared secret between two users by performing X25519 key agreement.
@frozen struct Data
init<D>(_ serialization: D, kem: HPKE.KEM) throws where D : ContiguousBytes
Creates a Curve25519 elliptic curve public key for use with Diffie-Hellman key exchange.
init<D>(rawRepresentation: D) throws where D : ContiguousBytes
Creates a Curve25519 public key for key agreement from a collection of bytes.
func hpkeRepresentation(kem: HPKE.KEM) throws -> Data
Creates a serialized representation of the public key.
typealias EphemeralPrivateKey = Curve25519.KeyAgreement.PrivateKey
The type of the ephemeral private key associated with this public key.
typealias HPKEEphemeralPrivateKey = Curve25519.KeyAgreement.PrivateKey
The type of the ephemeral private key associated with this public key.