Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- guard let publicKey = SecKeyCopyPublicKey(key) else {
- // Can't get public key
- return
- }
- let algorithm: SecKeyAlgorithm = .eciesEncryptionCofactorVariableIVX963SHA256AESGCM
- guard SecKeyIsAlgorithmSupported(publicKey, .encrypt, algorithm) else {
- // Algorith not supported
- return
- }
- // Now we're ready to encrypt data using publicKey
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement