Advertisement
DulcetAirman

decrypt (cloze)

Jun 9th, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1. static public String decrypt(String inputString) {
  2.     var length = /* how many characters in the input string? */
  3.     var sb = new StringBuffer(length);
  4.     sb.setLength(length);
  5.     var m = /* length of the first section */
  6.     var offset = /* start of the first section */;
  7.     var distance = /* how far away are the chars to be put?  */;
  8.     while (/* is there still work to be done */) {
  9.         var substr = /* get the section for this run */
  10.         var x = /* first index of an empty index in sb */
  11.         for (/* each char in this section */) {
  12.             char chr = /* the character */
  13.             sb.setCharAt(/* ??? */);
  14.             x += distance;
  15.         }
  16.         /*  update these values:
  17.             distance
  18.             offset
  19.             m
  20.          */
  21.     }
  22.     return sb.toString();
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement