gabriel / KBPGP

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

Build issue - NARandom uses a definition that's not in NAChloride #1

Closed ozobken closed 9 years ago

ozobken commented 9 years ago

KBJSCore.m has a call to an NARandom which has a definition requiring error:

(line 59) NSString *data = GHBase64StringFromNSData([NARandom randomData:[numBytes toUInt32] error:&error]);

as well as:

(line 110) return [[NARandom randomData:numBytes error:nil] na_hexString];

(this one also gets grumpy about the NSData na_hexString too - but not so sure about that.)

The current release of NAChloride's NARandom only has:

..are we out of sync somewhere, or am I missing something I need?

alexkunitsa commented 9 years ago

Hi, I had the same issue. As a temp solution:

added to NAChloride/NAChloride.h :

#import "NASecRandom.h"
#import "NANSData+Utils.h"

and replaced NARandom with NASecRandom in KBJSCore.m

ozobken commented 9 years ago

Of course - I worked around it by just changing the calls in KBJSCore.m to use the version without *error :)

gabriel commented 9 years ago

Might be fixed but I'm having trouble updating the pod. You can try to point at head..

pod 'KBPGP', :git => 'https://github.com/gabriel/KBPGP.git', :branch => :master

gabriel commented 9 years ago

ok I pushed a new pod.. should be version 0.1.4

I had to do --use-libraries because of openssl.. e.g. pod trunk push --use-libraries

ozobken commented 9 years ago

Looks good

-> Installing KBPGP 0.1.3 (was 0.1.1)