docs: public static String encode_password(String decoded_string, String crypto_algorithm, Map<String, String> properties) {
          /*
           * encoding process:
           * 
           * -- check for empty algorithm tag
           * -- convert input String to byte[] UTF8 conversion code
           * -- encipher byte[]
           * -- convert byte[] to String using using base64 encoding
           */
  
          StringBuilder buffer = new StringBuilder();
          buffer.append(CRYPTO_ALGORITHM_STARTED);
  
          if (crypto_algorithm.length() == 0) {
              // crypto algorithm is empty ... don't encode password
              buffer.append(CRYPTO_ALGORITHM_STOPPED).append(decoded_string);
          } else {
              // encode password with specified crypto algorithm
  
              String encoded_string = null;
              EncryptedInfo info = null;
  
              if (decoded_string.length() > 0) {
                  // convert decoded password string to byte[]
  
                  byte[] decrypted_bytes = convert_to_bytes(decoded_string);
  
                  if (decrypted_bytes.length > 0) {
                      // encrypt decrypted password byte[] with specified crypto algorithm
  
                      byte[] encrypted_bytes = null;
                      boolean done = false;
                      while (!done) {
                          try {
                              info = PasswordCipherUtil.encipher_internal(decrypted_bytes, crypto_algorithm, properties);
                              if (info != null) {
                                  encrypted_bytes = info.getEncryptedBytes();
                              }
  
                              done = true;
                          } catch (InvalidPasswordCipherException e) {
                              logger.logp(Level.SEVERE, PasswordUtil.class.getName(), "encode_password", "PASSWORDUTIL_CYPHER_EXCEPTION", e);
                              return null;
                          } catch (UnsupportedCryptoAlgorithmException e) {
                              logger.logp(Level.SEVERE, PasswordUtil.class.getName(), "encode_password", "PASSWORDUTIL_UNKNOWN_ALGORITHM_EXCEPTION", e);
                              return null;
                          }
                      }
                      if ((encrypted_bytes != null) && (encrypted_bytes.length > 0)) {
                          // convert encrypted password byte[] to viewable string
  
                          encoded_string = convert_viewable_to_string(encrypted_bytes);
  
                          if (encoded_string == null) {
                              // base64 encoding failed
                              return null;
                          }
                      }
                  }
              }
  
              buffer.append(crypto_algorithm);
              String alias = (null == info) ? null : info.getKeyAlias();
              if (alias != null && 0 < alias.length()) {
                  buffer.append(':').append(alias);
              }
              buffer.append(CRYPTO_ALGORITHM_STOPPED);
  
              if ((encoded_string != null) && (encoded_string.length() > 0)) {
                  // append encoded string
                  buffer.append(encoded_string);
              }
          }
  
          return buffer.toString();
      }