protected function generateNewSeed($passphrase = "", $forceEntropy = null) {
        // generate master seed, retry if the generated private key isn't valid (FALSE is returned)
        do {
            $mnemonic = $this->generateNewMnemonic($forceEntropy);

            $seed = (new Bip39SeedGenerator)->getSeed($mnemonic, $passphrase);

            $key = null;
            try {
                $key = HierarchicalKeyFactory::fromEntropy($seed);
            } catch (\Exception $e) {
                // try again
            }
        } while (!$key);

        return [$mnemonic, $seed, $key];
    }
protected function generateNewSeed($passphrase = "", $forceEntropy = null) {
        // generate master seed, retry if the generated private key isn't valid (FALSE is returned)
        do {
            $mnemonic = $this->generateNewMnemonic($forceEntropy);

            $seed = (new Bip39SeedGenerator)->getSeed($mnemonic, $passphrase);

            $key = null;
            try {
                $key = HierarchicalKeyFactory::fromEntropy($seed);
            } catch (\Exception $e) {
                // try again
            }
        } while (!$key);

        return [$mnemonic, $seed, $key];
    }
protected function generateNewSeed ( $ passphrase = "" , $ forceEntropy = null ) { // generate master seed, retry if the generated private key isn't valid (FALSE is returned) do { $ mnemonic = $ this -> generateNewMnemonic ( $ forceEntropy ) ; $ seed = ( new Bip39SeedGenerator ) -> getSeed ( $ mnemonic , $ passphrase ) ; $ key = null ; try { $ key = HierarchicalKeyFactory :: fromEntropy ( $ seed ) ; } catch ( \ Exception $ e ) { // try again } } while ( ! $ key ) ; return [ $ mnemonic , $ seed , $ key ] ; }
create a new key;
1) a BIP39 mnemonic
2) a seed from that mnemonic with the password
3) a private key from that seed

@param string    $passphrase             the password to use in the BIP39 creation of the seed
@param string    $forceEntropy           forced entropy instead of random entropy for testing purposes
@return array
create a new key ; 1 ) a BIP39 mnemonic 2 ) a seed from that mnemonic with the password 3 ) a private key from that seed