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
xA
Stringrepresenting the x-coordinate of the public key. This should be a Base64 URL encoded string.curveThe
EdDSACurverepresenting 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/publicKeyMissingif the x-coordinate data is missing or cannot be properly converted.