code: function blockmix_salsa8(BY, Yi, r, x, _X) {
          var i;
  
          arraycopy(BY, (2 * r - 1) * 16, _X, 0, 16);
          for (i = 0; i < 2 * r; i++) {
              blockxor(BY, i * 16, _X, 16);
              salsa20_8(_X, x);
              arraycopy(_X, 0, BY, Yi + (i * 16), 16);
          }
  
          for (i = 0; i < r; i++) {
              arraycopy(BY, Yi + (i * 2) * 16, BY, (i * 16), 16);
          }
  
          for (i = 0; i < r; i++) {
              arraycopy(BY, Yi + (i * 2 + 1) * 16, BY, (i + r) * 16, 16);
          }
      }
docs: The following is an adaptation of scryptsy See: https://www.npmjs.com/package/scryptsy