Instance Propertyswift-crypto 3.8.0_CryptoExtras
keySizeInBits
RSA.swift:616var keySizeInBits: Int { get }
Other members in extension
Type members
init<Bytes>(derRepresentation: Bytes
) throws Construct an RSA private key from a DER representation.
init(keySize: _RSA.Signing.KeySize
) throws Randomly generate a new RSA private key of a given size.
init(n: some ContiguousBytes, e: some ContiguousBytes, d: some ContiguousBytes, p: some ContiguousBytes, q: some ContiguousBytes
) throws Construct an RSA private key with the specified parameters.
init(pemRepresentation: String
) throws Construct an RSA private key from a PEM representation.
init<Bytes>(unsafeDERRepresentation: Bytes
) throws Construct an RSA public key from a DER representation.
init(unsafeKeySize: _RSA.Signing.KeySize
) throws Randomly generate a new RSA private key of a given size.
init(unsafePEMRepresentation: String
) throws Construct an RSA public key from a PEM representation.
Show implementation details (1)
Hide implementation details
static func _createFromNumbers(n: some ContiguousBytes, e: some ContiguousBytes, d: some ContiguousBytes
) throws -> _RSA.Encryption.PrivateKey Construct a private key with the specified parameters.
Instance members
var derRepresentation: Data
var pemRepresentation: String
var pkcs8PEMRepresentation: String
var publicKey: _RSA.Encryption.PublicKey
func decrypt<D>(D, padding: _RSA.Encryption.Padding
) throws -> Data Decrypt a message encrypted with this key’s public key and using the specified padding mode.