public static function generateSafeHash($length=16)
    {
        $factory = new CryptLib\Random\Factory;
        return preg_replace('/[^A-Za-z0-9\-]/', '', $factory->getLowStrengthGenerator()->generateString($length));
    }