-
Takes an input string, scans for public key sections, and then returns a Key for any valid keys found
- This method scans the file for public key armor - if no keys are found, an empty array is returned
- Each public key block found is “parsed” by
publicKeyFromPEMString() should that method throw, the error is swallowed and not rethrown
Declaration
Swift
public static func publicKeys(withPEM pemString: String) -> [PublicKey]Parameters
pemStringThe string to use to parse out values
Return Value
An array of
PublicKeyobjects containing just public keys.
-
Create a public key using key data.
Declaration
Swift
public init(with data: Data) throwsParameters
dataKey data
Return Value
New
PublicKeyinstance. -
Create a key using a native key.
Declaration
Swift
public init(with nativeKey: NativeKey)Parameters
nativeKeyNative key representation.
Return Value
New
PublicKeyinstance. -
Create a key using a native key.
PublicKey Class Reference