Closed Glavin001 closed 10 years ago
Use https://github.com/soffes/sskeychain for accessing Keychain and saving and retrieving accounts.
Don't fret too much about securing sensitive data in-memory: http://stackoverflow.com/a/1635286/2578205 Not much you can do, besides obfuscate it, and even that doesn't help from someone who knows what they are doing.
relativePath
to extract the URL path from the full URL (as does https://github.com/Streamlyne/web-app/blob/develop/app/scripts/adapters/streamlyne_adapter.js#L50 )
See https://developer.apple.com/library/Mac/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/Reference/Reference.html#jumpTo_45
var message = "ILove2Test!tTest!t";
var secret = "Streamlyne";
var shaObj = new jsSHA(message, 'TEXT');
var hmac = shaObj.getHMAC(secret, 'TEXT', 'SHA-1', 'HEX');
// hmac => "1c2c34e017a17a6ae42c0dbdf6a3586f6735de3b"
Encountered this, Request failed: unacceptable content-type: text/html using AFNetworking 2.0: http://stackoverflow.com/questions/19114623/request-failed-unacceptable-content-type-text-html-using-afnetworking-2-0
It is actually a bug with the server for the MeHandler
, it is using the old self.write
and self.finish
methods instead of self.respond
. I will submit a fix (/cc @dreid93).
Also received this error: http://stackoverflow.com/questions/14171111/cocoa-error-3840-using-json-ios
The fix I am pushing to the server will also resolve this. The trick was to use
self.respond(json.loads(ret_data))
Instead of
self.respond(ret_data)
I looked over the source code of other methods calling self.respond
and they all used dictionaries (JSON in-memory) instead of strings (already stringified JSON).
See https://github.com/Streamlyne/web-app/blob/develop/app/scripts/adapters/streamlyne_adapter.js#L80-L86
And http://stackoverflow.com/a/3469033/2578205