src/Core/Composer/StarterInstaller.php
protected static function genSecretCode(IOInterface $io)
    {
        $file = getcwd() . '/etc/conf/system.php';

        $config = file_get_contents($file);

        $hash = 'Windwalker-' . hrtime(true);

        $salt = $io->ask("\nSalt to generate secret [{$hash}]: ", $hash);

        $config = str_replace('This-token-is-not-safe', md5(hrtime(true) . $salt), $config);

        file_put_contents($file, $config);

        $io->write('Auto created secret key.');
    }
protected static function genSecretCode(IOInterface $io)
    {
        $file = getcwd() . '/etc/conf/system.php';

        $config = file_get_contents($file);

        $hash = 'Windwalker-' . hrtime(true);

        $salt = $io->ask("\nSalt to generate secret [{$hash}]: ", $hash);

        $config = str_replace('This-token-is-not-safe', md5(hrtime(true) . $salt), $config);

        file_put_contents($file, $config);

        $io->write('Auto created secret key.');
    }
protected static function genSecretCode ( IOInterface $ io ) { $ file = getcwd ( ) . '/etc/conf/system.php' ; $ config = file_get_contents ( $ file ) ; $ hash = 'Windwalker-' . hrtime ( true ) ; $ salt = $ io -> ask ( "\nSalt to generate secret [{$hash}]: " , $ hash ) ; $ config = str_replace ( 'This-token-is-not-safe' , md5 ( hrtime ( true ) . $ salt ) , $ config ) ; file_put_contents ( $ file , $ config ) ; $ io -> write ( 'Auto created secret key.' ) ; }
Generate secret code.

@param IOInterface $io

@return  void
Generate secret code .