[李景山php]每天laravel-20160827|McryptEncrypter-1
来源:互联网 发布:52单片机引脚功能 编辑:程序博客网 时间:2024/05/21 22:52
namespace Illuminate\Encryption;use Exception;use RuntimeException;use Illuminate\Contracts\Encryption\DecryptException;use Illuminate\Contracts\Encryption\EncryptException;use Illuminate\Contracts\Encryption\Encrypter as EncrypterContract;/** * @deprecated since version 5.1. Use Illuminate\Encryption\Encrypter. */class McryptEncrypter extends BaseEncrypter implements EncrypterContract{// use Mcrypt Encrypter extends baseEncrypter /** * The algorithm used for encryption. * * @var string */ protected $cipher;// this is a algorithm used for encryption /** * The block size of the cipher. * * @var int */ protected $block;// block size about cipher /** * Create a new encrypter instance. * * @param string $key * @param string $cipher * @return void * * @throws \RuntimeException */ public function __construct($key, $cipher = MCRYPT_RIJNDAEL_128) { $key = (string) $key;// use parameter is key and cipher [algorithm] if (static::supported($key, $cipher)) { $this->key = $key;// key $this->cipher = $cipher;// cipher $this->block = mcrypt_get_iv_size($this->cipher, MCRYPT_MODE_CBC);// get the block } else { throw new RuntimeException('The only supported ciphers are MCRYPT_RIJNDAEL_128 and MCRYPT_RIJNDAEL_256.'); }// if wrong throw error }
0 0
- [李景山php]每天laravel-20160827|McryptEncrypter-1
- [李景山php]每天laravel-20160828|McryptEncrypter-2
- [李景山php]每天laravel-20160829|McryptEncrypter-3
- [李景山php]每天laravel-20160901|Dispatcher-1
- [李景山php]每天laravel-20160910|Filesystem-1
- [李景山php]每天laravel-20160914|FileSystemManager-1
- [李景山php]每天laravel-20160919|Writer-1
- [李景山php]每天laravel[036]-laravel 系统服务 --- 认证-1
- [李景山php]每天laravel[038]-laravel 系统服务 --- 授权-1
- [李景山php]每天laravel-20161001|Validator.php-1
- [李景山php]每天laravel-20161018|RedirectResponse.php-1
- [李景山php]每天laravel-20161020|Request.php-1
- [李景山php]每天laravel-20161102|CompileEngine.php-1
- [李景山php]每天laravel-20161117|ConnectionFatory.php-1
- [李景山php]每天laravel-20161129|BelongsToMany.php-1
- [李景山php]每天laravel-20160922|RedisServicProvider.php
- [李景山php]每天laravel-20160923|Hub.php
- [李景山php]每天laravel-20160924|PiplineServiceProvider.php
- ELK(elasticsearch+logstash+kibana) 日志分析
- get访问连接中文
- Appium+Robotframework实现Android应用的自动化测试-1:Appium在Windows中的安装
- Linux线程-互斥锁pthread_mutex_t
- 如何处理字符串中加入特殊符号?
- [李景山php]每天laravel-20160827|McryptEncrypter-1
- Android UI Libs之ExplosionField
- 协方差
- Appium+Robotframework实现Android应用的自动化测试-2:Windows中启动Appium和模拟器
- JavaScript 练习题
- 上海复旦大学吴立德教授深度学习课程五
- 我的屌丝giser成长记-研三篇
- AVCaptureDevice 曝光模式
- 如何学好web前端