Re: PHP to Java

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Oct 16, 2008, at 10:50 PM, ceo@xxxxxxxxx wrote:


For reasons we needn't go into, I need to convert this to Java:

$to_encode = "example.com/api?foo=bar";
$key = "asdfasdfasdfasdfasdfasdf"; //fake value, but 24 bytes
$td = mcrypt_module_open('tripledes', '', 'ecb', '');
mcrypt_generic_init ($td, $key, $iv);
$c_t = mcrypt_generic ($td, $to_encode);

I've been Googling for hours and tried all kinds of stuff, none of which came even close.

Any suggestions on a good reference or conversion program or something?...

a little somethingsomething

String to_encode = new String("example.com/api?foo=bar");
String key = new String("asdfasdfasdfasdfasdfasdf");
Mcrypt_module td = new Mcrypt_module('tripledes', '', 'ecb', '');
td.init(key, iv);
td.mcrypt_generic(to_encode);




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux