public function generateBase32RandomKey($length = 16, $prefix = '')
    {
        $secret = $prefix ? $this->toBase32($prefix) : '';

        $secret = $this->strPadBase32($secret, $length);

        $this->validateSecret($secret);

        return $secret;
    }
public function generateBase32RandomKey($length = 16, $prefix = '')
    {
        $secret = $prefix ? $this->toBase32($prefix) : '';

        $secret = $this->strPadBase32($secret, $length);

        $this->validateSecret($secret);

        return $secret;
    }
public function generateBase32RandomKey ( $ length = 16 , $ prefix = '' ) { $ secret = $ prefix ? $ this -> toBase32 ( $ prefix ) : '' ; $ secret = $ this -> strPadBase32 ( $ secret , $ length ) ; $ this -> validateSecret ( $ secret ) ; return $ secret ; }
Generate a digit secret key in base32 format.

@param int    $length
@param string $prefix

@throws IncompatibleWithGoogleAuthenticatorException
@throws InvalidCharactersException

@return string
Generate a digit secret key in base32 format .