Jump to content

Password encrypt


Recommended Posts

I used the following function to encrypt password.

 

function encrypt($text){

 

    $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CFB);

    $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);

    $key = "Secret";

    return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_CFB, $iv));

 

}

 

 

But an error occurred saying that the function mcrypt_get_iv_size is undefined.Please help me.

Link to comment
https://forums.phpfreaks.com/topic/158865-password-encrypt/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.