code: static public String encode(byte[] bytes, String indentation) {
          StringBuilder result = new StringBuilder();
          int length = bytes.length;
          if (length == 0) return "";  // empty byte array
          if (indentation != null) result.append(indentation);
          encodeByte(bytes, 0, result);
          for (int i = 1; i < length; i++) {
              if (i % 40 == 0) {
                  // format to indented 80 character blocks
                  result.append("\n");
                  if (indentation != null) result.append(indentation);
              }
              encodeByte(bytes, i, result);
          }
          return result.toString();
      }
docs: This function encodes a byte array using base 16 with a specific indentation of new lines.
  
  @param bytes The byte array to be encoded.
  @param indentation The indentation string to be inserted before each new line.
  @return The base 16 encoded string.