Instance Propertyswift-crypto 3.8.0_CryptoExtras
publicKey
RSA.swift:253var publicKey: _RSA.Signing.PublicKey { 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.Signing.PrivateKey Construct a private key with the specified parameters.
Instance members
var derRepresentation: Data
var keySizeInBits: Int
var pemRepresentation: String
var pkcs8PEMRepresentation: String
func signature<D>(for: D
) throws -> _RSA.Signing.RSASignature Generates an RSA signature with the given key using the default padding.
func signature<D>(for: D
) throws -> _RSA.Signing.RSASignature Generates an RSA signature with the given key using the default padding.
func signature<D>(for: D, padding: _RSA.Signing.Padding
) throws -> _RSA.Signing.RSASignature Generates an RSA signature with the given key.
func signature<D>(for: D, padding: _RSA.Signing.Padding
) throws -> _RSA.Signing.RSASignature Generates an RSA signature with the given key. SHA256 is used as the hash function.