public static function random(int $length = 64, string $characters = CharacterType::PRINTABLE_ASCII): string
    {
        $str = '';
        $l   = self::length($characters) - 1;

        for ($i = 0; $i < $length; $i++) {
            $r = \random_int(0, $l);
            $str .= $characters[$r];
        }

        return $str;
    }