Structure
EdDSA.PrivateKey
A struct representing a private key used in EdDSA (Edwards-curve Digital Signature Algorithm).
struct PrivateKey
Overview
In JWT, EdDSA private keys are represented as a pair of x-coordinate and private key (d) and are used for signing. Currently, only the Curve/ed25519 curve is supported.
Topics
Operators
static func == (EdDSA.PrivateKey, EdDSA.PrivateKey) -> BoolReturns a Boolean value indicating whether two values are equal.
Initializers
init(backing: Curve25519.Signing.PrivateKey)Creates anEdDSA.PrivateKeyinstance using the provided private key.init(curve: EdDSACurve) throwsGenerates a newEdDSAKeyinstance with both public and private key components.init(d: String, curve: EdDSACurve) throwsCreates anEdDSA.PrivateKeyinstance using both the public and private key components along with the specified curve.init(pem: String) throwsCreates anEdDSA.PrivateKeyinstance using the provided PEM (Privacy Enhanced Mail) representation.
Instance Properties
var pemRepresentation: StringPEM (Privacy Enhanced Mail) representation of the public key.var publicKey: EdDSA.PublicKeyEdDSA.PublicKeyassociated with this private key.var rawRepresentation: DataRaw bytes representation of the private key.
Relationships
Conforms To
EdDSAKeySwift.EquatableSwift.SendableSwift.SendableMetatype