src/Biz/Util/Phpsec/Crypt/TripleDES.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* Pure-PHP implementation of Triple DES.
*
* Uses mcrypt, if available, and an internal implementation, otherwise. Operates in the EDE3 mode (encrypt-decrypt-encrypt).
*
* PHP version 5
*
* Here's a short example of how to use this library:
* <code>
* <?php
* include 'vendor/autoload.php';
*
* $des = new \Biz\Util\Phpsec\Crypt\TripleDES();
*
* $des->setKey('abcdefghijklmnopqrstuvwx');
*
* $size = 10 * 1024;
* $plaintext = '';
* for ($i = 0; $i < $size; $i++) {
* $plaintext.= 'a';
* }
*
* echo $des->decrypt($des->encrypt($plaintext));
* ?>
* </code>
*
* @category Crypt
*
* @author Jim Wigginton <terrafrost@php.net>
* @copyright 2007 Jim Wigginton
* @license http://www.opensource.org/licenses/mit-license.html MIT License
*
* @see http://phpseclib.sourceforge.net
*/
namespace Biz\Util\Phpsec\Crypt;
/**
* Pure-PHP implementation of Triple DES.
*
*
* @author Jim Wigginton <terrafrost@php.net>
*/
class TripleDES extends DES
{
/**
* Encrypt / decrypt using inner chaining.
*
* Inner chaining is used by SSH-1 and is generally considered to be less secure then outer chaining (self::MODE_CBC3).
*/
const MODE_3CBC = -2;
/**
* Encrypt / decrypt using outer chaining.
*
* Outer chaining is used by SSH-2 and when the mode is set to \Biz\Util\Phpsec\Crypt\Base::MODE_CBC.
*/
const MODE_CBC3 = Base::MODE_CBC;
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。