x963Representation
An ANSI x9.63 representation of the private key.
- iOS
- 13+
- macOS
- 10.15+
- Mac Catalyst
- 13+
- tvOS
- 13+
- visionOS
- 1.0+
- watchOS
- 6+
var x963Representation: Data { get }An ANSI x9.63 representation of the private key.
var x963Representation: Data { get }s6Crypto4P521O7SigningO10PrivateKeyV18x963Representation20FoundationEssentials4DataVvp What are these?ESZAimport CryptoA cryptography library for Swift.
struct PrivateKeyA P-521 private key used to create cryptographic signatures.
enum P521An elliptic curve that enables NIST P-521 signatures and key agreement.
enum SigningA mechanism used to create or verify a cryptographic signature using the NIST P-521 elliptic curve digital signature algorithm (ECDSA).
init(compactRepresentable: Bool = true) Creates a random P-521 private key for signing.
init<Bytes>(derRepresentation: Bytes) throws where Bytes : RandomAccessCollection, Bytes.Element == UInt8 Creates a P-521 private key for signing from a Distinguished Encoding Rules (DER) encoded representation.
init(pemRepresentation: String) throws Creates a P-521 private key for signing from a Privacy-Enhanced Mail PEM) representation.
init<Bytes>(rawRepresentation: Bytes) throws where Bytes : ContiguousBytes Creates a P-521 private key for signing from a collection of bytes.
init<Bytes>(x963Representation: Bytes) throws where Bytes : ContiguousBytes Creates a P-521 private key for signing from an ANSI x9.63 representation.
var derRepresentation: Data { get }A Distinguished Encoding Rules (DER) encoded representation of the private key.
var pemRepresentation: String { get }A Privacy-Enhanced Mail (PEM) representation of the private key.
var publicKey: P521.Signing.PublicKey { get }The corresponding public key.
var rawRepresentation: Data { get }A data representation of the private key.
func signature<D>(for data: D) throws -> P521.Signing.ECDSASignature where D : DataProtocol Generates an Elliptic Curve Digital Signature Algorithm (ECDSA) signature of the data you provide over the P-521 elliptic curve, using SHA-512 as the hash function.
func signature<D>(for digest: D) throws -> P521.Signing.ECDSASignature where D : Digest Generates an Elliptic Curve Digital Signature Algorithm (ECDSA) signature of the digest you provide over the P-521 elliptic curve.