init(compactRepresentable:)
Creates a random P-384 private key for key agreement.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
init(compactRepresentable: Bool = true)
Parameters
- compactRepresentable
A Boolean value that indicates whether CryptoKit creates the key with the structure to enable compact point encoding.
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:)
.