Click here to Skip to main content
15,905,913 members

Comments by Member 10239759 (Top 5 by date)

Member 10239759 2-Sep-13 5:42am View    
thanks i found solution for this with PKCS7Padding in php
now i fixed the issue

thank for you reply
Member 10239759 30-Aug-13 6:55am View    
thanks mr.Prasad khandekar its working fine
i have few question

byte[] bytIn = new byte[] {'m', 'u', 't', 'h', 'u', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

but i want place a big string.

how to place a string and

also another help

decryption in php and java

encryption and decryption in iphone needed

for iphone also need to produce same output as got in php and android

thanks in advance mr.Prasad khandekar
Member 10239759 29-Aug-13 10:28am View    
return new String(Base64.encodeBase64(enc));

Base64.encodeBase64(enc)

showing undefined function android

thanks in advance
Member 10239759 29-Aug-13 7:26am View    
i am getting result for

text:muthu
key:u

in mobile i am getting result as

MhPPaUb7eMbol6zUKjHcrA==


$data_to_encrypt = "muthu";
$key128 = "u";
$iv = "0000000000000000";

$cc = $data_to_encrypt;
$key = $key128;
$iv = $iv;
$length = strlen($cc);

$cipher = mcrypt_module_open(MCRYPT_RIJNDAEL_128,'','cbc',$iv);

mcrypt_generic_init($cipher, $key, $iv);
$encrypted = base64_encode(mcrypt_generic($cipher,$cc));
mcrypt_generic_deinit($cipher);

mcrypt_generic_init($cipher, $key, $iv);
$decrypted = mdecrypt_generic($cipher,base64_decode($encrypted));
mcrypt_generic_deinit($cipher);

echo "encrypted: " . $encrypted;
echo "<br/?-->";
echo "length:".strlen($encrypted);
echo "<br/>";
echo "decrypted: " . substr($decrypted, 0, $length);




this is my php code
i am getting hlxZgzP+0afprqIzYyEKSw==
Member 10239759 29-Aug-13 7:07am View    
ok whatever it might be i need the solution for this problem can you help me