Contents

init(compactRepresentable:)

Creates a random P-256 private key for signing.

Declaration

init(compactRepresentable: Bool = true)

Parameters

  • compactRepresentable:

    A Boolean value that indicates whether CryptoKit creates the key with the structure to enable compact point encoding.

Discussion

Keys that use a compact point encoding enable shorter public keys, but aren’t compliant with FIPS certification. If your app requires FIPS certification, create a key with init(rawRepresentation:).

See Also

Creating a private key