| View previous topic :: View next topic |
| Author |
Message |
Vic D'Elfant Past Contributor


Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Sun May 02, 2004 5:26 pm Post subject: vdscrypt.dll: PHP server side - VDS client |
|
|
I'm trying to make a PHP serverside script that encodes a string, and a VDS client that decompiles it to retrieve the data the webserver sent.
I'm using the vdscrypt extension, but somehow is the encrypted output of the php script different then the output I get when encoding the same string with the same key and initilization vector with the vdscrypt dll.
PHP:
| Code: | <?php
$key = "very_secret";
$text = "hello!";
$iv = "VDSWORLD";
print base64_encode(mcrypt_encrypt(MCRYPT_BLOWFISH, $key, $text, MCRYPT_MODE_CBC, $iv));
?> |
(this script has also been uploaded to the webserver, see http://vic.vdsworld.com/phpblowf.php)
VDS:
| Code: |
external vdscrypt.dll
#define function, vdsencrypt
info @vdsencrypt(CryptStr, blowfish, VDSWORLD, very_secret, hello!)
|
What am I doing wrong?
Regards,
Vic
BTW: I'm on holiday till friday, so I can't answer your posts till then  _________________ phpBB Development Team |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
Vic D'Elfant Past Contributor


Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Sun May 02, 2004 5:49 pm Post subject: |
|
|
I tried using the base64_encode, because the vdscrypt manual says the following:
| vdscrypt.dll manual wrote: | | ... and all string encryption/decryption with all algorithms are encoded/decoded with Base64 mime ... |
Regards,
Vic _________________ phpBB Development Team |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun May 02, 2004 7:57 pm Post subject: |
|
|
I believe that the blowfish.dll contains a PHP script in its package, compatible
with the DLL.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
X-Tools Valued Contributor

Joined: 20 Sep 2001 Posts: 296 Location: Germany
|
Posted: Mon May 03, 2004 5:22 am Post subject: |
|
|
Hi,
I think your IV is the problem. As I remember the IV has to have a specific lenght (for ex. 16 characters should work). So the encryption is specified.
Bye, Fabian |
|
| Back to top |
|
 |
|