Heim  >  Artikel  >  php教程  >  php 和 java共用的加密方法

php 和 java共用的加密方法

WBOY
WBOYOriginal
2016-06-06 19:59:041173Durchsuche

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

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn