0
這裏只是一個簡短的問題,我想知道把我的註冊碼放到服務器上的用戶的最佳位置。我正在加密它看到here。隱藏iOS上用戶的註冊碼
//encrypting
NSString* strToEncrypt =NewPINField.text
NSString* theKey = @\"KeyKeyKeyKey\";
NSData* dataToEncrypt = [strToEncrypt dataUsingEncoding: NSUTF8StringEncoding];
NSData *encryptedData = [dataToEncrypt EncryptWithKey: theKey];
NSLog(@\"Encrypted data: %@\", encryptedData);
//decrypting
NSData* encryptedData = (NSData*)[profileData objectForKey:@\"PIN\"];
NSString* theKey = @\"KeyKeyKeyKey\"; //notice this is the same as above. It MUST be
NSData *decData = [encryptedData DecryptWithKey: theKey ];
currentPIN = [NSString stringWithUTF8String:[decData bytes]];
NSLog(@\"Decrypted pin: %@\", currentPIN);
唯一的其他規範是隱藏它/把它放在一個沒有認識的地方。 我需要保存狀態,所以它需要某種plist,我只是想知道是否有辦法隱藏它比直接添加到我的plist文件好一點。
你會做什麼?
任何幫助將不勝感激。
LOL感謝兆一堆..現在要了解這一點。我一直在加密研究堆,但這正是我需要thankyoU! – HurkNburkS 2013-05-06 23:02:08