class EnvironmentBasedDomainNameProvider {

    public String getCommonName(String endpointName, String environmentName, String accountName) {
        String domain = getDomainName(environmentName, accountName);
        //Hashing the concatenation of endpoint and environment names with SipHash24 as they are unique within a base-domain and account
        String uniqueNameToBeHashed = endpointName + environmentName;
        String clusterHash = sipHash24().hashUnencodedChars(uniqueNameToBeHashed).toString();
        return clusterHash + DOMAIN_PART_DELIMITER + domain;
    }

}