rncryptor

Undefined symbols for architecture armv7 after importing RNCryptor

試著忘記壹切 提交于 2019-12-05 10:44:53
I imported RNCryptor, which can be found here: https://github.com/rnapier/RNCryptor into my app. However, I've been getting three errors with this in the log. Undefined symbols for architecture armv7: "_SecRandomCopyBytes", referenced from: +[RNCryptor randomDataOfLength:] in RNCryptor.o "_kSecRandomDefault", referenced from: +[RNCryptor randomDataOfLength:] in RNCryptor.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) I saw that this is normally caused when imported classes are not included in the target, but I

Password Verification - How to securely check if entered password is correct

空扰寡人 提交于 2019-12-04 20:42:46
I'm developing an app that requires multiple passwords to access varying data areas. For example, a group of people could set up a chat that requires password authentication to view. Here's how I'm considering doing it: I have my keyword, let's say hypothetically: Banana When the user enters their password, I use RNCryptor to encrypt Banana using their entered key, and store that encrypted string to the server. Later, when someone tries to enter a password, I take the hashed value from the server and try to decrypt it using the password they entered as a key. If the decrypted value equals

RNCryptor AES256 to match PHP MCRYPT_RIJNDAEL_256

删除回忆录丶 提交于 2019-12-04 16:02:26
The PHP API I’m calling from within my iOS app requires the payload to be encrypted in a certain customised way. I’m having troubles replicating that approach in Objective-C, with RNCryptor. Here is the PHP code used to encrypt a string: function encrypt($string) { $key = 'some-random-key'; return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5(md5($key)))); } And this how I’m trying to achieve the same encryption result in Objective-C: + (NSData*)encryptData:(NSData*)sourceData { NSString *keyString = @"some-random-key"; NSData *key = [[keyString

Memory issues when encrypting/decrypting a large file with RNCryptor on iOS

痴心易碎 提交于 2019-12-03 09:41:03
问题 I'm trying to use RNCryptor to encrypt and decrypt large files (600+MB) on iOS. On the github I found example code on how to use the library asynchronously on streams. This code is similar to the answer of Rob Napier on a question about this same subject. However, although I think I implemented the code correctly, the app uses up to 1.5 GB of memory (in the iPad 6.1 simulator). I thought the code was supposed to prevent the app from keeping more than one block of data in-memory? So what is

Memory issues when encrypting/decrypting a large file with RNCryptor on iOS

*爱你&永不变心* 提交于 2019-12-03 01:15:26
I'm trying to use RNCryptor to encrypt and decrypt large files (600+MB) on iOS. On the github I found example code on how to use the library asynchronously on streams. This code is similar to the answer of Rob Napier on a question about this same subject . However, although I think I implemented the code correctly, the app uses up to 1.5 GB of memory (in the iPad 6.1 simulator). I thought the code was supposed to prevent the app from keeping more than one block of data in-memory? So what is going wrong? In my controller, I create a 'CryptController' which I message with encrypt/decrypt

Dispatch queues and asynchronous RNCryptor

泄露秘密 提交于 2019-11-29 14:29:47
问题 This is a follow-up to Asynchronously decrypt a large file with RNCryptor on iOS I've managed to asynchronously decrypt a large, downloaded file (60Mb) with the method described in this post, corrected by Calman in his answer. It basically goes like this: int blockSize = 32 * 1024; NSInputStream *cryptedStream = [NSInputStream inputStreamWithFileAtPath:...]; NSOutputStream *decryptedStream = [NSOutputStream output...]; [cryptedStream open]; [decryptedStream open]; RNDecryptor *decryptor = [