-
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
pemString
The string to use to parse out values
Return Value
An array of
PublicKey
objects containing just public keys.
-
Create a public key using key data.
Declaration
Swift
public init(with data: Data) throws
Parameters
data
Key data
Return Value
New
PublicKey
instance. -
Create a key using a native key.
Declaration
Swift
public init(with nativeKey: NativeKey)
Parameters
nativeKey
Native key representation.
Return Value
New
PublicKey
instance. -
Create a key using a native key.