getKeyPrimitives
RSA.swift:171func getKeyPrimitives() throws -> (modulus: Data, publicExponent: Data)
func getKeyPrimitives() throws -> (modulus: Data, publicExponent: Data)
s6JWTKit8InsecureO3RSAO9PublicKeyV03getE10Primitives20FoundationEssentials4DataV7modulus_AK14publicExponenttyKF
What are these?51C20
import JWTKit
🔑 JSON Web Token signing and verification (HMAC, RSA, PSS, ECDSA, EdDSA) using SwiftCrypto.
struct PublicKey
A structure representing a public 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 Data
init(backing: _RSA.Signing.PublicKey) throws
Creates an RSA.PublicKey
from a SwiftCrypto public key.
init(certificatePEM: String) throws
Creates an RSA.PublicKey
from public certificate PEM file.
init(certificatePEM: some DataProtocol) throws
Creates an RSA.PublicKey
from public certificate PEM file.
init(modulus: String, exponent: String) throws
Initializes a new RSA key instance with modulus and exponent
init(pem: String) throws
Creates an RSA.PublicKey
from public key PEM file.
init(pem data: some DataProtocol) throws
Creates an RSA.PublicKey
from public key PEM file.
var derRepresentation: Data { get }
Exports the current public key as a DER encoded data.
var pemRepresentation: String { get }
static func == (lhs: Self, rhs: Self) -> Bool