PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Blowfish Error.

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Encryption
View previous topic :: View next topic  
Author Message
andrew_ww



Joined: 06 Sep 2008
Posts: 1

PostPosted: Sat Sep 06, 2008 6:22 pm    Post subject: Blowfish Error. Reply with quote

Hello,

I'm trying to learn how to PEAR. I've sucessfully installed the requirements and tested the example implementation and it works. I'm now trying to get some more exmaple to work. I've found this one I'd like to look at:

http://pear.php.net/package/Crypt_Blowfish/

I've installed it and all I wish to do is to create a example. I have created the following code but it keeps giving the following error:

Fatal error: Call to undefined method Crypt_Blowfish::factory() in C:\inetpub\wwwroot\en.php on line 7

Here is the code, any suggestions as to how I might fix this greatly appreciated:

Code:
<?php
// Include PEAR::Crypt_Blowfish
require_once 'Crypt/Blowfish.php';

/////////////

$bf =& Crypt_Blowfish::factory('ecb');
 if (PEAR::isError($bf)) {
     echo $bf->getMessage();
     exit;
 }
 $bf->setKey('My secret key');
 $encrypted = $bf->encrypt('this is some example plain text');
 $plaintext = $bf->decrypt($encrypted);
 echo "plain text: $plaintext";

?>
Back to top
View user's profile Send private message
rindaa



Joined: 02 Mar 2010
Posts: 1

PostPosted: Tue Mar 02, 2010 1:27 pm    Post subject: Reply with quote

Its a very good encryption algorithm.
_________________
baby coupons
baby coupons
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Encryption All times are GMT + 2 Hours
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



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement