Home >php教程 >php手册 >php 和 java共用的加密方法

php 和 java共用的加密方法

WBOY
WBOYOriginal
2016-06-06 19:59:041206browse

http://www.php.net/manual/en/ref.mcrypt.php To have the same result in Java and PHP with the BouncyCastle library : php function encrypt($str, $operation, $key) { $ret = ''; $key = pack('H*', $key); if (strtoupper($operation) == 'DECODE')

 

http://www.php.net/manual/en/ref.mcrypt.php

To have the same result in Java and PHP with the BouncyCastle library :

 

 

php

 

 

java

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn