forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


vdscrypt.dll: PHP server side - VDS client

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Sun May 02, 2004 5:26 pm    Post subject: vdscrypt.dll: PHP server side - VDS client Reply with quote

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? Rolling Eyes

Regards,
Vic

BTW: I'm on holiday till friday, so I can't answer your posts till then Wink

_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sun May 02, 2004 5:46 pm    Post subject: Reply with quote

Maybe it doesn't work because of the base64_encode function used with PHP?
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Sun May 02, 2004 5:49 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun May 02, 2004 7:57 pm    Post subject: Reply with quote

I believe that the blowfish.dll contains a PHP script in its package, compatible
with the DLL. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Mon May 03, 2004 5:22 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group