<?php

namespace ModulesGarden\Servers\OpenXchange\App\Libs;

class CreatorHelper
{
    public static function randomUsername($domain)
    {
        $domain = explode('.', $domain)[0];
        $username = substr($domain, 0, 4);
        return $username;
    }

    public static function randomExtUsername($username)
    {
        return $username.bin2hex(random_bytes(3));
    }
}
