Note that there are some explanatory texts on larger screens.

plurals
  1. POdecrypt value from blowfish in Objective-C code
    primarykey
    data
    text
    <p>I am recieving the Encrypted data by server (BLOWFISH ALGORITHM) , I have to decrypt it by using blowfish algorithm in IOS.</p> <p>you can donwload my code from here : <a href="https://www.dropbox.com/s/nswsm7des7isgd5/BlowfishTest-4.zip" rel="nofollow noreferrer">https://www.dropbox.com/s/nswsm7des7isgd5/BlowfishTest-4.zip</a></p> <p>I am struggling from 2 days with this task , I try lot of links and find few useful :</p> <ol> <li><a href="https://www.schneier.com/blowfish-download.html" rel="nofollow noreferrer">Blowfish Source code</a></li> <li><a href="https://stackoverflow.com/questions/13507384/how-to-implement-blowfish-algorithm-in-ios">How to implement Blowfish algorithm in iOS</a></li> <li><a href="http://www.codeding.com/articles/blowfish-encryption-algorithm-for-iphone" rel="nofollow noreferrer">http://www.codeding.com/articles/blowfish-encryption-algorithm-for-iphone</a></li> </ol> <p>In third link, i got ECB ( I have to decrypt using ECB). but this code also not gives correct output after decryption.</p> <p>I am using a online tool for testing and this shows correct output : <a href="http://www.tools4noobs.com/online_tools/decrypt/" rel="nofollow noreferrer">http://www.tools4noobs.com/online_tools/decrypt/</a></p> <pre><code>Key = 20zE1E47BE57$51 Input value is = aed5c110d793f850521a4dd3a56a70d9 Algorithm = BLOWFISH Mode = ECB Decode the input using= Hexa output = aYzY1380188405 ( this is correct output which i want) </code></pre> <p>and I am getting : ¹àÀhÒ¢º¹iÂF</p> <p>Here is my code :</p> <pre><code>//Mode selected by default in nib: “ECB” NSString *modeString = [encryptionModeControl titleForSegmentAtIndex:encryptionModeControl.selectedSegmentIndex]; BlowfishAlgorithm *blowFish = [BlowfishAlgorithm new]; [blowFish setMode:[BlowfishAlgorithm buildModeEnum:modeString]]; [blowFish setKey:key]; [blowFish setInitVector:initVector]; [blowFish setupKey]; NSString *cipherText = cipherTextView.text; NSString *plainText = [blowFish decrypt:cipherText]; NSLog(@"cipher-text: %@", cipherText); NSLog(@"plain-text: %@", plainText); </code></pre> <p>Note : Server side data is Encrypted using BLOWFISH in ECB mode, and converted to hexadecimal notation. <img src="https://i.stack.imgur.com/owyec.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload