Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   PHP zu Delphi mit DCPCrypt (https://www.delphipraxis.net/154136-php-zu-delphi-mit-dcpcrypt.html)

s811 29. Aug 2010 14:26

Delphi-Version: 2005

PHP zu Delphi mit DCPCrypt
 
Hallo :)
Ich versuche zur Zeit folgenden PHP-Code zu Delphi zu portieren:
Code:
function base16Encode($arg){
   $ret="";
   for($i=0;$i<strlen($arg);$i++){
      $tmp=ord(substr($arg,$i,1));   
      $ret.=dechex($tmp);   
}
   return $ret;
}

$key="1234567890987654";
$pubKey=base16Encode($key);
$link="http://test.com/testfile.zip";
$cp = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', 'cbc', '');
@mcrypt_generic_init($cp, $key,$key);
$enc = mcrypt_generic($cp, $link);  
mcrypt_generic_deinit($cp);   
mcrypt_module_close($cp);
$crypted=base64_encode($enc);
echo $crypted;
Weiß jemand, wie ich das zu Delphi portieren (mit Hilfe von DCPCrypt) kann?
Vielen Dank :)

daywalker9 29. Aug 2010 14:52

AW: PHP zu Delphi mit DCPCrypt
 
Was hast du bisher gemacht?


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:03 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz