init(modulus:exponent:privateExponent:prime1:prime2:)
RSA.swift:299init(modulus: String, exponent: String, privateExponent: String, prime1: String, prime2: String) throws
init(modulus: String, exponent: String, privateExponent: String, prime1: String, prime2: String) throws
s6JWTKit8InsecureO3RSAO10PrivateKeyV7modulus8exponent15privateExponent6prime16prime2AGSS_S4StKcfc
What are these?9YEBO
import JWTKit
🔑 JSON Web Token signing and verification (HMAC, RSA, PSS, ECDSA, EdDSA) using SwiftCrypto.
struct PrivateKey
A structure representing a private RSA key.
enum Insecure
A container for older, cryptographically insecure algorithms.
enum RSA
Namespace encompassing functionality related to the RSA (Rivest–Shamir–Adleman) cryptographic algorithm. Relatively to other algorithms such as ECDSA and EdDSA, RSA is considered slow and should be avoided when possible.
@frozen struct String
A Unicode string value that is a collection of characters.
init(backing: _RSA.Signing.PrivateKey) throws
Creates an RSA.PrivateKey
from a SwiftCrypto private key.
init(modulus: String, exponent: String, privateExponent: String) throws
Initializes a new RSA.PrivateKey
instance with modulus, exponent, and private exponent.
init(pem: String) throws
Creates anRSA.PrivateKey
from private key PEM file in String format.
init(pem data: some DataProtocol) throws
Creates anRSA.PrivateKey
from private key PEM file in Data format.
var derRepresentation: Data { get }
Exports the current private key as a DER encoded data.
var pemRepresentation: String { get }
Exports the current private key as a PEM encoded string.
var publicKey: PublicKey { get }
static func == (lhs: Self, rhs: Self) -> Bool