Question

I'm trying to encrypt a string the same way on a server in PHP as on an Objective-C on iOS. I've used PHP's crypt() function with the blowfish algorithm, but it takes two parameters: the string to encode and a salt. The Objective-C implementation I found: https://dl.dropboxusercontent.com/u/28430840/Blowfish-iOS-Source.zip which was at http://www.codeding.com/articles/blowfish-encryption-algorithm-for-iphone takes three different parameters: either EBC/CBC encoding, an initvector and a key -- how does this translate to the PHP salt?

I found the initial c library but I have no idea how to include it in my project -- when I compile it fails and complains about the x86.S file.

Thanks!!!

Was it helpful?

Solution

I suppose you are looking at the wrong function. It's not crypt what you search, but mcrypt_encrypt.

This function takes an init vector, a key and an encoding parameter.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top