code: public static String getCryptoAlgorithm(String password) {
          if (null == password) {
              return null;
          }
          String algorithm = null;
          String data = password.trim();
  
          if (data.length() >= 2) {
              if ('{' == data.charAt(0)) {
                  int end = data.indexOf('}', 1);
                  if (end > 0) {
                      algorithm = data.substring(1, end).trim();
                  }
              }
          }
  
          return algorithm;
      }
docs: Return the crypto algorithm of the provided password.
  For example, if the password is {xor}CDo9Hgw=, "xor" will be returned.
  
  @param password the encoded string with encoding algorithm.
  @return The encoding algorithm. Null if not present.