You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Utility for compressing and decompressing P256 public keys on platforms
149
-
/// where native CryptoKit support for compressed keys is unavailable.
146
+
/// Utility for compressing and decompressing p256 public keys on platforms where native CryptoKit support
147
+
/// for compressed keys is unavailable.
150
148
///
151
-
/// This wrapper supports SEC1 compressed key encoding (33 bytes) and
152
-
/// decoding by reconstructing the full point on the curve using the
153
-
/// Weierstrass equation.
149
+
/// This wrapper supports SEC1 compressed key encoding (33 bytes) and decoding by reconstructing the full
150
+
/// point on the curve using the Weierstrass equation.
154
151
///
155
-
/// Use this only on iOS/tvOS 13–15. Prefer native CryptoKit APIs
156
-
/// on newer platforms.
157
-
@available(iOS, introduced:13, obsoleted:16)
158
-
@available(tvOS, introduced:13, obsoleted:16)
159
-
publicstructCompressedP256{
160
-
161
-
/// Compresses a P256 public key using SEC1 encoding.
152
+
/// Use this only on iOS and tvOS 13–15. Prefer native CryptoKit APIs on newer platforms.
153
+
@available(iOS, deprecated:16, renamed:"P256.Signing.PublicKey.init(compressedRepresentation:)", message:"Use the initializer 'P256.Signing.PublicKey(compressedRepresentation:)' available on iOS 16 and later.")
154
+
@available(tvOS, deprecated:16, renamed:"P256.Signing.PublicKey.init(compressedRepresentation:)", message:"Use the initializer 'P256.Signing.PublicKey(compressedRepresentation:)' available on tvOS 16 and later.")
155
+
@available(macOS, renamed:"P256.Signing.PublicKey.init(compressedRepresentation:)", message:"Use the initializer 'P256.Signing.PublicKey(compressedRepresentation:)' available on macOS.")
156
+
@available(visionOS, renamed:"P256.Signing.PublicKey.init(compressedRepresentation:)", message:"Use the initializer 'P256.Signing.PublicKey(compressedRepresentation:)' available on visionOS.")
157
+
@available(watchOS, renamed:"P256.Signing.PublicKey.init(compressedRepresentation:)", message:"Use the initializer 'P256.Signing.PublicKey(compressedRepresentation:)' available on watchOS.")
158
+
internalstructCompressedP256{
159
+
160
+
/// Compresses a p256 public key using SEC1 encoding.
162
161
///
163
-
/// - Parameter key: A valid uncompressed P256 public key.
162
+
/// - Parameter key: A valid uncompressed p256 public key.
164
163
/// - Returns: A 33-byte compressed SEC1 representation.
165
164
///
166
165
/// - Throws: If compression fails (e.g., invalid raw data).
0 commit comments