/**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->app->singleton('encrypter', function ($app) {
         $encrypter = new Encrypter($app['config']['app.key']);
         if ($app['config']->has('app.cipher')) {
             $encrypter->setCipher($app['config']['app.cipher']);
         }
         return $encrypter;
     });
 }
Esempio n. 2
0
 /**
  * Set the encryption cipher.
  *
  * @param string $cipher
  * @return void 
  * @static 
  */
 public static function setCipher($cipher)
 {
     \Illuminate\Encryption\Encrypter::setCipher($cipher);
 }