gabriel / KBPGP

PGP for iOS/OSX using kbpgp.js and JavaScriptCore
MIT License
10 stars 5 forks source link

Encrypt/Decrypt #4

Open alexkunitsa opened 9 years ago

alexkunitsa commented 9 years ago

I can't encrypt/decrypt messages. There is no error, but nothing happens. Method is called, but no callback.

 -[KBJSCore readFile:]:96: JSCore content:keybase.js, 1624538
 -[KBJSCore readFile:]:96: JSCore content:keybase-kbpgp-jscore.js, 19090

Can anybody help with that?

alexkunitsa commented 9 years ago

Looks like problem was with weak reference GHWeakSelf.

gabriel commented 9 years ago

yeah you have to keep a strong reference to KBPGP... For example, you'll see the test cases have to do this.

it's a flaw... but to be honest the whole project, running pgp javascript in a runtime with an objective-c, is a bit of a hack

this project is not ideal...

I'm working at Keybase now BTW and we're working on a objective-c to go library which should make this library obsolete. In fact I've stopped using it myself.

On Tue, Aug 18, 2015 at 2:10 AM, Alex Kunitsa notifications@github.com wrote:

Looks like problem was with weak reference GHWeakSelf.

— Reply to this email directly or view it on GitHub https://github.com/gabriel/KBPGP/issues/4#issuecomment-132128306.

alexkunitsa commented 9 years ago

Looks like this is the best iOS PGP library. I I tried almost all possible cases) There is only one thing left that I need to implement - encrypt/decrypt files

gabriel commented 9 years ago

yeah theoretically it should be possible since kbpgp.js supports files: https://keybase.io/kbpgp/docs/buffers

Though I probably won't have time to implement it myself anytime soon, sorry :(

On Tue, Aug 18, 2015 at 8:07 AM, Alex Kunitsa notifications@github.com wrote:

Looks like this is the best iOS PGP library. I I tried almost all possible cases) There is only one thing left that I need to implement - encrypt/decrypt files

— Reply to this email directly or view it on GitHub https://github.com/gabriel/KBPGP/issues/4#issuecomment-132242808.