Instance Property
rawRepresentation
The raw 32-byte private key as Data. Keep this value confidential; disclosure allows anyone to compute shared secrets with this key.
- iOS 13.0+
- macCatalyst 13.0+
- macOS 10.15+
- tvOS 13.0+
- visionOS 1.0+
- watchOS 6.0+
var rawRepresentation: Data { get }
Discussion
The bytes are zeroed when the backing PrivateKeyImplementation is deallocated, but copies made through this accessor are not: any Data produced here escapes the zeroization scope and must be handled by the caller. Prefer restricting its reach to the minimum necessary scope (e.g. one encrypted write to a keychain) before discarding.