Skip to content

Initializer

init(x:curve:)

Creates an EdDSA.PublicKey instance using the public key x-coordinate and specified curve.
init(x: String, curve: EdDSACurve) throws

Parameters

x

A String representing the x-coordinate of the public key. This should be a Base64 URL encoded string.

curve

The EdDSACurve representing the elliptic curve used for the EdDSA public key.

Discussion

This init allows for the creation of an EdDSA.PublicKey using the x-coordinate of the public key. The provided x-coordinate should be a Base64 URL encoded string.

Throws

  • EdDSAError/publicKeyMissing if the x-coordinate data is missing or cannot be properly converted.