Click here to Skip to main content
12,504,695 members (58,777 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: PHP
I am decrypting the encrypted code in PHP by using the following code.

function decrypt($string) {
            $string = base64_decode($string);
 
            //key 
            $key = "xxxxxxxx";
             
 
            $cipher_alg = MCRYPT_TRIPLEDES;
 
            $iv = mcrypt_create_iv(mcrypt_get_iv_size($cipher_alg,MCRYPT_MODE_ECB), MCRYPT_RAND); 
             
 
            $decrypted_string = mcrypt_decrypt($cipher_alg, $key, $string, MCRYPT_MODE_ECB, $iv); 
            return trim($decrypted_string);
    }
But it is giving the following exception.
Warning: mcrypt_decrypt(): Module initialization failed in C:\inetpub\sample.php

How can we resolve this issue.....
Posted 27-Nov-12 1:24am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160919.1 | Last Updated 27 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100