rawRepresentation
A data representation of the private key.
- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
var rawRepresentation: Data { get }
A data representation of the private key.
var rawRepresentation: Data { get }
s6Crypto4P384O01_A6ExtrasE6_VOPRFO10PrivateKeyV17rawRepresentation20FoundationEssentials4DataVvp
What are these?9QXKF
import _CryptoExtras
import Crypto
struct PrivateKey
A P-384 public key used to evaluate blinded inputs.
enum P384
An elliptic curve that enables NIST P-384 signatures and key agreement.
enum _VOPRF
A 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).
@frozen struct Data
init(compactRepresentable: Bool = true)
Creates a random P-384 private key for VOPRF(P-384, SHA-384).
init<Bytes>(derRepresentation: Bytes) throws where Bytes : RandomAccessCollection, Bytes.Element == UInt8
Creates a P-384 private key for VOPRF(P-384, SHA-384) from a Distinguished Encoding Rules (DER) encoded representation.
init(pemRepresentation: String) throws
Creates a P-384 private key for VOPRF(P-384, SHA-384) from a Privacy-Enhanced Mail PEM) representation.
init<Bytes>(rawRepresentation: Bytes) throws where Bytes : ContiguousBytes
Creates a P-384 private key for VOPRF(P-384, SHA-384) from a collection of bytes.
init<Bytes>(x963Representation: Bytes) throws where Bytes : ContiguousBytes
Creates a P-384 private key for VOPRF(P-384, SHA-384) 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: P384._VOPRF.PublicKey { get }
The corresponding public key.
var x963Representation: Data { get }
An ANSI x9.63 representation of the private key.
func evaluate<D>(_ input: D) throws -> Data where D : DataProtocol
Compute the PRF without blinding or proof.
func evaluate(_ blindedElement: P384._VOPRF.BlindedElement) throws -> P384._VOPRF.BlindEvaluation
Compute the evaluated element and associated proof for verification by the client.