Re: PHP to Java
| From: | Børge Holen | Date: | Thu, 16 Oct 2008 21:08:39 +0000 |
| Subject: | Re: PHP to Java | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-282002@lists.php.net to get a copy of this message | ||
On Oct 16, 2008, at 10:50 PM, ceo@l-i-e.com 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