aytul 0 Newbie Poster

Hi aytul here
i m having a problem with my php script actually i need to incorporate variable key lengths in my encryption technique but the following code give me the same keylength in all the cases plz tellme where to change in my script to get variable key length.

$iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB); 
		 $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); 
		 $cryptedpass = bin2hex(mcrypt_encrypt (MCRYPT_BLOWFISH, $this->mykey, $plaintext, MCRYPT_MODE_ECB, $iv));

and i get keylength from

echo mcrypt_get_key_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.