derRepresentation
A Distinguished Encoding Rules (DER) encoded representation of the public key.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
var derRepresentation: Data { get }
A Distinguished Encoding Rules (DER) encoded representation of the public key.
var derRepresentation: Data { get }
s6Crypto4P384O7SigningO9PublicKeyV17derRepresentation20FoundationEssentials4DataVvp
What are these?VR6E
import Crypto
A cryptography library for Swift.
struct PublicKey
A P-384 public key used to verify cryptographic signatures.
enum P384
An elliptic curve that enables NIST P-384 signatures and key agreement.
enum Signing
A mechanism used to create or verify a cryptographic signature using the NIST P-384 elliptic curve digital signature algorithm (ECDSA).
@frozen struct Data
init<Bytes>(compactRepresentation: Bytes) throws where Bytes : ContiguousBytes
Creates a P-384 public key for signing from a compact representation of the key.
init<Bytes>(compressedRepresentation: Bytes) throws where Bytes : ContiguousBytes
Creates a P-384 public key for signing from a compressed representation of the key.
init<Bytes>(derRepresentation: Bytes) throws where Bytes : RandomAccessCollection, Bytes.Element == UInt8
Creates a P-384 public key for signing from a Distinguished Encoding Rules (DER) encoded representation.
init(pemRepresentation: String) throws
Creates a P-384 public key for signing from a Privacy-Enhanced Mail (PEM) representation.
init<D>(rawRepresentation: D) throws where D : ContiguousBytes
Creates a P-384 public key for signing from a collection of bytes.
init<Bytes>(x963Representation: Bytes) throws where Bytes : ContiguousBytes
Creates a P-384 public key for signing from an ANSI x9.63 representation.
var compactRepresentation: Data? { get }
A compact representation of the public key.
var compressedRepresentation: Data { get }
A compressed representation of the public key.
var pemRepresentation: String { get }
A Privacy-Enhanced Mail (PEM) representation of the public key.
var rawRepresentation: Data { get }
A full representation of the public key.
var x963Representation: Data { get }
An ANSI x9.63 representation of the public key.
func isValidSignature<D>(_ signature: P384.Signing.ECDSASignature, for data: D) -> Bool where D : DataProtocol
Verifies an elliptic curve digital signature algorithm (ECDSA) signature on a block of data over the P-384 elliptic curve.
func isValidSignature<D>(_ signature: P384.Signing.ECDSASignature, for digest: D) -> Bool where D : Digest
Verifies an elliptic curve digital signature algorithm (ECDSA) signature on a digest over the P-384 elliptic curve.