Created
June 29, 2020 01:12
-
-
Save cardosoedgar/3eb1e6ae486e5a335b65084349c7cc59 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func getRawPubKey() ->String? { | |
var error: Unmanaged<CFError>? | |
guard let pubkey = getPublicKey(), | |
let keyData = SecKeyCopyExternalRepresentation(pubkey, &error) else { return nil } | |
let data = keyData as Data | |
return data.base64EncodedString() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment