Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CryptKeyGenerator.php
Go to the documentation of this file.
1 <?php
7 namespace Magento\Setup\Model;
8 
11 
16 {
20  private $random;
21 
27  public function __construct(Random $random)
28  {
29  $this->random = $random;
30  }
31 
38  public function generate()
39  {
40  return md5($this->getRandomString());
41  }
42 
49  private function getRandomString()
50  {
51  return $this->random->getRandomString(ConfigOptionsListConstants::STORE_KEY_RANDOM_STRING_SIZE);
52  }
53 }