iphone Programming Glossary: aleftbox
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.. length i 8 Divide data into octets... ¦and then into quartets aLeftRange NSMakeRange i 4 aRightRange NSMakeRange i 4 4 aLeftBox dataToEncrypt subdataWithRange aLeftRange aRightBox dataToEncrypt subdataWithRange aRightRange Convert bytes into unsigned.. subdataWithRange aLeftRange aRightBox dataToEncrypt 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..
|