iphone Programming Glossary: cryptor
How to decrypt a file in Objective C/IOS that is encrypted in php? http://stackoverflow.com/questions/10078026/how-to-decrypt-a-file-in-objective-c-ios-that-is-encrypted-in-php   initializationVector id iv data or string   options CCOptions options   error CCCryptorStatus error CCCryptorRef cryptor NULL CCCryptorStatus status kCCSuccess NSParameterAssert key isKindOfClass NSData class key isKindOfClass NSString class.. keyData ivData status CCCryptorCreate kCCDecrypt algorithm options   keyData bytes keyData length ivData bytes   cryptor if status kCCSuccess  if error NULL  error status return nil NSData result self _runCryptor cryptor result status if result.. ivData bytes   cryptor if status kCCSuccess  if error NULL  error status return nil NSData result self _runCryptor cryptor result status if result nil error NULL error status CCCryptorRelease cryptor return result 2nd function from above code.. 
 How to encrypt an NSString in Objective C with DES in ECB-Mode? http://stackoverflow.com/questions/2512184/how-to-encrypt-an-nsstring-in-objective-c-with-des-in-ecb-mode  encodes each blocks individually. The problem is that your input string doesn't divide into 8 bytes equally and the cryptor doesn't know what to do with the final non 8 byte block. The fix is to allow the cryptor to pad the final block by adding.. into 8 bytes equally and the cryptor doesn't know what to do with the final non 8 byte block. The fix is to allow the cryptor to pad the final block by adding kCCOptionPKCS7Padding to the options to CCCrypt. eg snippet from an NSData encryption category.. 
 
 
     
      |