Skip to content

You're viewing documentation for a pre-release version. View the latest stable version

Initializer

init(rawRepresentation:)

iOS 26.0+ macOS 26.0+ tvOS 26.0+ watchOS 26.0+
Creates an MLDSA.PublicKey instance using the provided raw byte representation.
init(rawRepresentation: some DataProtocol) throws

Parameters

rawRepresentation

The raw bytes of the public key. Its length must match the one expected by the parameter set the key belongs to.

Discussion

Throws

If the provided bytes aren’t a valid public key for the key’s parameter set.