芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/www/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php
registerEncrypter(); $this->registerOpisSecurityKey(); } /** * Register the encrypter. * * @return void */ protected function registerEncrypter() { $this->app->singleton('encrypter', function ($app) { $config = $app->make('config')->get('app'); return new Encrypter($this->parseKey($config), $config['cipher']); }); } /** * Configure Opis Closure signing for security. * * @return void */ protected function registerOpisSecurityKey() { $config = $this->app->make('config')->get('app'); if (! class_exists(SerializableClosure::class) || empty($config['key'])) { return; } SerializableClosure::setSecretKey($this->parseKey($config)); } /** * Parse the encryption key. * * @param array $config * @return string */ protected function parseKey(array $config) { if (Str::startsWith($key = $this->key($config), $prefix = 'base64:')) { $key = base64_decode(Str::after($key, $prefix)); } return $key; } /** * Extract the encryption key from the given configuration. * * @param array $config * @return string * * @throws \RuntimeException */ protected function key(array $config) { return tap($config['key'], function ($key) { if (empty($key)) { throw new MissingAppKeyException; } }); } }