Skip to content
Snippets Groups Projects
Commit 4e5e37f8 authored by jakobsbode's avatar jakobsbode
Browse files

added completion argument; see last commit

parent f7607dc0
No related branches found
No related tags found
No related merge requests found
...@@ -13,13 +13,13 @@ func importPrivateKey(){ ...@@ -13,13 +13,13 @@ func importPrivateKey(){
let path = NSBundle.mainBundle().pathForResource("alice2005-private", ofType: "gpg") let path = NSBundle.mainBundle().pathForResource("alice2005-private", ofType: "gpg")
handler.pgp.importKeysFromFile(path!, allowDuplicates: true/*false*/) handler.pgp.importKeysFromFile(path!, allowDuplicates: true/*false*/)
//KeyHandler.createHandler().addKey(handler.pgp.keys[0]) //KeyHandler.createHandler().addKey(handler.pgp.keys[0])
KeyHandler.getHandler().addPrivateKey(handler.pgp.keys[0]) KeyHandler.getHandler().addPrivateKey(handler.pgp.keys[0], completion: nil)
} }
func importPublicKey(){ func importPublicKey(){
let handler = CryptoHandler.getHandler() let handler = CryptoHandler.getHandler()
let path = NSBundle.mainBundle().pathForResource("alice2005-2", ofType: "gpg") let path = NSBundle.mainBundle().pathForResource("alice2005-2", ofType: "gpg")
handler.pgp.importKeysFromFile(path!, allowDuplicates: true/*false*/) handler.pgp.importKeysFromFile(path!, allowDuplicates: true/*false*/)
KeyHandler.getHandler().addKey(handler.pgp.keys[0]) KeyHandler.getHandler().addKey(handler.pgp.keys[0], completion: nil)
//KeyHandler.createHandler().addPrivateKey(handler.pgp.keys[0]) //KeyHandler.createHandler().addPrivateKey(handler.pgp.keys[0])
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment