Structureswift-crypto 3.12.2Crypto
PrivateKey
A Curve25519 private key used to create cryptographic signatures.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
struct PrivateKey
A Curve25519 private key used to create cryptographic signatures.
struct PrivateKey
import Crypto
A cryptography library for Swift.
enum Signing
A mechanism used to create or verify a cryptographic signature using Ed25519.
enum Curve25519
An elliptic curve that enables X25519 key agreement and Ed25519 signatures.
struct PublicKey
A Curve25519 public key used to verify cryptographic signatures.
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol Escapable
init()
Creates a random Curve25519 private key for signing.
init<D>(rawRepresentation data: D) throws where D : ContiguousBytes
Creates a Curve25519 private key for signing from a data representation.
var publicKey: PublicKey { get }
The corresponding public key.
var rawRepresentation: Data { get }
The raw representation of the key as a collection of contiguous bytes.
func signature<D>(for data: D) throws -> Data where D : DataProtocol
Generates an EdDSA signature over Curve25519.