Jump to content


Photo

Encryoting to DES


  • Please log in to reply
2 replies to this topic

#1 superpimp

superpimp
  • Members
  • PipPip
  • Member
  • 24 posts

Posted 22 April 2006 - 03:19 PM

Is it possible to encrypt strings into DES?

thx!

#2 Tim

Tim
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 22 April 2006 - 04:00 PM

Use [a href=\"http://www.php.net/mcrypt\" target=\"_blank\"]mcrypt[/a].

#3 superpimp

superpimp
  • Members
  • PipPip
  • Member
  • 24 posts

Posted 22 April 2006 - 04:10 PM

[!--quoteo(post=367473:date=Apr 22 2006, 06:00 PM:name=Tim)--][div class=\'quotetop\']QUOTE(Tim @ Apr 22 2006, 06:00 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Use [a href=\"http://www.php.net/mcrypt\" target=\"_blank\"]mcrypt[/a].
[/quote]

Well, I read that manual, but I dont get a thing.

<?php
$key = "this is a secret key";
$input = "Let us meet at 9 o'clock at the secret place.";

$encrypted_data = mcrypt_ecb (MCRYPT_DES, $key, $input, MCRYPT_ENCRYPT);
?> 

What string is gonna be encrypted? $key or $input?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users