Jump to content

Search the Community

Showing results for tags 'blowfish'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. I am just curious, is this the correct way to implement blowfish encryption? class: <?php /* * @package "Gludoe CMS" * @version 1.0.1 * @authors "Robert Pettet" * @support https://www.gludoe.com/ * @licence https://www.gludoe.com/commons/licence-1.0.0.txt */ if (!defined('_ROOT')) exit(header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found')); class Blowfish { private $key; private $iv; public function __construct($key, $iv) { $this->key = $key; $this->iv = $iv; } public function encrypt($data) { return mcrypt_encrypt(MCRYPT_BLOWFISH, $this->key, $data, MCRYPT_MODE_CBC, $this->iv); } public function decrypt($data) { return mcrypt_decrypt(MCRYPT_BLOWFISH, $this->key, $data, MCRYPT_MODE_CBC, $this->iv); } } ?> example: $blowfish = new blowfish('DfRgBWE4Y4T7UgTWEdFP1Y','85440934'); $data = $blowfish->encrypt('testString'); echo $blowfish->decrypt($data); //Output: testString
  2. I'm trying to use a simple encryption class and getting 500 errors. I was able to pinpoint the error to a check for CRYPT_BLOWFISH: if( CRYPT_BLOWFISH == 1 ) { // .... } I thought all php 5.3.X installations were supposed to have CRYPT_BLOWFISH defined. What can I do? The encryption class needs it, and I'm hoping there's an easy fix.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.