compactRepresentation
A compact representation of the public key.
- iOS
- 16.0+
- macOS
- 13.0+
- Mac Catalyst
- 16.0+
- tvOS
- 16.0+
- visionOS
- 2.0+
- watchOS
- 9.0+
var compactRepresentation: Data? { get }A compact representation of the public key.
var compactRepresentation: Data? { get }s6Crypto4P384O01_A6ExtrasE6_VOPRFO9PublicKeyV21compactRepresentation20FoundationEssentials4DataVSgvp What are these?2GZ3Oimport CryptoA cryptography library for Swift.
import _CryptoExtrasProvides additional cryptographic APIs that are not available in CryptoKit (and therefore the core Crypto library).
struct PublicKeyA P-384 public key used to blind inputs and finalize blinded elements.
enum P384An elliptic curve that enables NIST P-384 signatures and key agreement.
enum _VOPRFA mechanism to compute the output of a pseudorandom without the client learning the secret or the server learning the input using the P384-SHA384 Verifiable Oblivious Pseudorandom Function (VOPRF).
init<Bytes>(compactRepresentation: Bytes) throws where Bytes : ContiguousBytes Creates a P-384 public key for VOPRF(P-384, SHA-384) from a compact representation of the key.
init<Bytes>(compressedRepresentation: Bytes) throws where Bytes : ContiguousBytes Creates a P-384 public key for VOPRF(P-384, SHA-384) 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 VOPRF(P-384, SHA-384) from a Distinguished Encoding Rules (DER) encoded representation.
init(pemRepresentation: String) throws Creates a P-384 public key for VOPRF(P-384, SHA-384) from a Privacy-Enhanced Mail (PEM) representation.
init<D>(rawRepresentation: D) throws where D : ContiguousBytes Creates a P-384 public key for VOPRF(P-384, SHA-384) from a collection of bytes.
init<Bytes>(x963Representation: Bytes) throws where Bytes : ContiguousBytes Creates a P-384 public key for VOPRF(P-384, SHA-384) from an ANSI x9.63 representation.
var compressedRepresentation: Data { get }A compressed representation of the public key.
var derRepresentation: Data { get }A Distinguished Encoding Rules (DER) encoded representation of the public key.
var oprfRepresentation: Data { get }An RFC 9497 OPRF 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 blind<D>(_ input: D) throws -> P384._VOPRF.BlindedInput where D : DataProtocol Blind an input to be evaluated by the server using the VOPRF protocol.
func finalize(_ blindedInput: P384._VOPRF.BlindedInput, using blindEvaluation: P384._VOPRF.BlindEvaluation) throws -> Data Compute the output of the VOPRF by verifying the server proof, and unblinding and hashing the evaluated element.