Blowfish encryption is implemented using PHP and C ++, but the results are different. First, the MD5 experiment has the same results, but the Blowfish experiment cannot be used.
The call is as follows:
% S", Strtoupper (bin2hex ($ dtext);}
First MD5 experiment, the result is the same, but use Blowfish experiment, how to do also can not succeed
The call is as follows:
%s", Strtoupper (Bin2Hex ($dtext))); } Mcrypt_module_close ($cipher);
C + + is the case:
Md5_ctx MD5;
Blowfish encryption is implemented using PHP and C ++, but the results are different... first, the MD5 experiment has the same results, but the Blowfish experiment cannot be successful. the following code is called: PHPcode & lt ;? Php $
Blowfish encryption, respectively, using PHP and C + + implementation, but the results are different ...
First MD5 experiment, the result is the same, but use Blowfish experiment, how to do also can not succeed
The call is as follows:
PHP Code
1. BlowfishAlgorithmDescription (the data type in this document is based on tc2.0)
The blowfish algorithm is used to encrypt 64-bit strings.The blowfish algorithm uses two "Boxes": ungigned long pbox [18] and unsigned long sbox [4,256].In the
Encounter a demand, pay password submitted to the server using Blowfish encryption, online data is very few, found the code is also with the results of online encryption, online encryption (to confirm the encryption results are incorrect):Blowfish
PHP Blowfish algorithm encryption and decryption for your reference, the specific contents are as follows
pkcs5_pad ($str, $size);
if (Mcrypt_generic_init ($cipher, $this->key, $this->iv)!=-1) {$cipherText = Mcrypt_generic ($cipher, $STR);
IntroductionEncryption refers to the process of blurring data by using a key or a password. In SQL Server, encryption does not replace other security settings, such as preventing unauthorized people from accessing the database or the Windows system
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.