code: private static int symmetricKeyAlgorithmNameToTag(String cipherName) {
      // Use CAST5 if no cipher specified
      if (StringUtils.isEmpty(cipherName)) {
        return PGPEncryptedData.CAST5;
      }
  
      Set<Field> fields = ReflectionUtils.getAllFields(PGPEncryptedData.class, ReflectionUtils.withName(cipherName));
  
      if (fields.isEmpty()) {
        throw new RuntimeException("Could not find tag for cipher name " + cipherName);
      }
  
      try {
        return fields.iterator().next().getInt(null);
      } catch (IllegalAccessException e) {
        throw new RuntimeException("Could not access field " + cipherName, e);
      }
    }
docs: Convert a string cipher name to the integer tag used by GPG
  @param cipherName the cipher name
  @return integer tag for the cipher