iphone Programming Glossary: arightbox
How to implement Blowfish algorithm in iOS http://stackoverflow.com/questions/13507384/how-to-implement-blowfish-algorithm-in-ios ctx Blowfish_Init ctx unsigned char secretKey bytes secretKey length NSRange aLeftRange aRightRange NSData aLeftBox aRightBox unsigned long dl 0 dr 0 for int i 0 i dataToEncrypt length i 8 Divide data into octets... ¦and then into quartets aLeftRange.. quartets aLeftRange NSMakeRange i 4 aRightRange NSMakeRange i 4 4 aLeftBox dataToEncrypt subdataWithRange aLeftRange aRightBox dataToEncrypt subdataWithRange aRightRange Convert bytes into unsigned long aLeftBox getBytes dl length sizeof unsigned.. subdataWithRange aRightRange Convert bytes into unsigned long aLeftBox getBytes dl length sizeof unsigned long aRightBox getBytes dr length sizeof unsigned long Encipher Blowfish_Encrypt ctx dl dr Put bytes back dataToEncrypt replaceBytesInRange..
|