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 a public key from its raw byte representation.
init(rawRepresentation: some DataProtocol) throws

Parameters

rawRepresentation

The raw bytes of the public key.

Discussion

Throws

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