Contents

init()

Creates a random MLDSA65 private key.

Declaration

init() throws

Discussion

This initializer is marked throws to support use in generic contexts, but key generation itself doesn’t produce errors.

When you call this initializer directly on a concrete type, rather than through a generic type parameter, you can safely call try! to create the key:

let privateKey = try! MLDSA65.PrivateKey()

See Also

Creating a private key