class KerberosOperationHandler {

  protected Set<EncryptionType> translateEncryptionTypes(String names, String delimiter)
      throws KerberosOperationException {
    Set<EncryptionType> encryptionTypes = new HashSet<>();

    if (!StringUtils.isEmpty(names)) {
      for (String name : names.split((delimiter == null) ? "\\s+" : delimiter)) {
        encryptionTypes.addAll(translateEncryptionType(name.trim()));
      }
    }

    if (encryptionTypes.isEmpty()) {
      throw new KerberosOperationException("All the encryption type names you set are not supported. Aborting.");
    }
    return encryptionTypes;
  }

}