We had a method to generate the random passwords for the customers in Magento1 in following class.
app\code\core\Mage\Customer\Model\Customer.php
method >>
/**
* Retrieve random password
*
* @param int $length
* @return string
*/
public function generatePassword($length = 8)
{
$chars = Mage_Core_Helper_Data::CHARS_PASSWORD_LOWERS
. Mage_Core_Helper_Data::CHARS_PASSWORD_UPPERS
. Mage_Core_Helper_Data::CHARS_PASSWORD_DIGITS
. Mage_Core_Helper_Data::CHARS_PASSWORD_SPECIALS;
return Mage::helper('core')->getRandomString($length, $chars);
}
What is the similar method in Magento2?