Advertisement
Guest User

Untitled

a guest
May 24th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. guard let publicKey = SecKeyCopyPublicKey(key) else {
  2. // Can't get public key
  3. return
  4. }
  5. let algorithm: SecKeyAlgorithm = .eciesEncryptionCofactorVariableIVX963SHA256AESGCM
  6. guard SecKeyIsAlgorithmSupported(publicKey, .encrypt, algorithm) else {
  7. // Algorith not supported
  8. return
  9. }
  10. // Now we're ready to encrypt data using publicKey
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement