Skip to content

Type Method

public(pem:)

Creates RSAKey from public key pem file.
static func `public`(pem string: String) throws -> RSAKey

Discussion

Public key pem files look like:

-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC0cOtPjzABybjzm3fCg1aCYwnx
...
aX4rbSL49Z3dAQn8vQIDAQAB
-----END PUBLIC KEY-----

This key can only be used to verify JWTs.