Instance Propertyswift-crypto 3.12.2_CryptoExtras
pkcs1DERRepresentation
RSA.swift:554- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
var pkcs1DERRepresentation: Data { get }
var pkcs1DERRepresentation: Data { get }
s13_CryptoExtras4_RSAO10EncryptionO9PublicKeyV22pkcs1DERRepresentation20FoundationEssentials4DataVvp
What are these?2HBLX
import _CryptoExtras
Provides additional cryptographic APIs that are not available in CryptoKit (and therefore the core Crypto library).
struct PublicKey
Identical to PublicKey
.
enum _RSA
Types associated with the RSA algorithm
enum Encryption
@frozen struct Data
init<Bytes>(derRepresentation: Bytes) throws where Bytes : DataProtocol
Construct an RSA public key from a DER representation.
init(n: some ContiguousBytes, e: some ContiguousBytes) throws
Construct an RSA public key with the specified parameters.
init(pemRepresentation: String) throws
Construct an RSA public key from a PEM representation.
init<Bytes>(unsafeDERRepresentation derRepresentation: Bytes) throws where Bytes : DataProtocol
Construct an RSA public key from a DER representation.
init(unsafePEMRepresentation pemRepresentation: String) throws
Construct an RSA public key from a PEM representation.
var derRepresentation: Data { get }
var keySizeInBits: Int { get }
var pemRepresentation: String { get }
var pkcs1PEMRepresentation: String { get }
func encrypt<D>(_ data: D, padding: _RSA.Encryption.Padding) throws -> Data where D : DataProtocol
Encrypt a message with this key, using the specified padding mode.
func getKeyPrimitives() throws -> Primitives
func maximumEncryptSize(with padding: _RSA.Encryption.Padding) -> Int
Return the maximum amount of data in bytes this key can encrypt in a single operation when using the specified padding mode.
struct Primitives