function Encrypt(input, rawKey) {
  var hexArrayOutput = [];

  for (let j = 0; j < _numLoops; j++) {
    hexArrayOutput = [];

    var shuffleVar = parseInt(randomBits(), 2);
    var shuffleHex = shuffleVar.toString(16).padStart(_numPartBytes, '0');
    var key = iterateKeyChars(rawKey, shuffleVar);

    for (let i = 0; i < input.length; i++) {
      var keyChar = key[(i + j) % key.length];
      var newKey = iterateKeyChar(keyChar, i + j);
      var op = Ops[newKey];
      var charAsciiHex = input[i];
      var charAsciiBin = hex2bin(charAsciiHex);

      var outBins = op(charAsciiBin);

      var outHex = parseInt(outBins, 2)
        .toString(16)
        .padStart(_numPartBytes, '0');
      hexArrayOutput.push(outHex);
      // for (let index = 0; index < outBins.length; index++) {
      //   var hexChar = outBins[index];
      // }
    }
    hexArrayOutput.push(shuffleHex);
    input = shuffle(hexArrayOutput);

    if (_verbose == 2) {
      ConsoleOut('encrypt' + j, hexArrayOutput);
    }
  }

  return hexArrayOutput;
}
/**
input = array of hex value strings (each element should be 8 bits long); 
rawKey = the key as given by the 
*/
input = array of hex value strings (each element should be 8 bits long);
rawKey = the key as given by the
input = array of hex value strings ( each element should be 8 bits long ) ; rawKey = the key as given by the
function Encrypt(input, rawKey) {
  var hexArrayOutput = [];
  for (let j = 0; j < _numLoops; j++) {
    hexArrayOutput = [];
    var shuffleVar = parseInt(randomBits(), 2);
    var shuffleHex = shuffleVar.toString(16).padStart(_numPartBytes, '0');
    var key = iterateKeyChars(rawKey, shuffleVar);
    for (let i = 0; i < input.length; i++) {
      var keyChar = key[(i + j) % key.length];
      var newKey = iterateKeyChar(keyChar, i + j);
      var op = Ops[newKey];
      var charAsciiHex = input[i];
      var charAsciiBin = hex2bin(charAsciiHex);
      var outBins = op(charAsciiBin);
      var outHex = parseInt(outBins, 2)
        .toString(16)
        .padStart(_numPartBytes, '0');
      hexArrayOutput.push(outHex);
    }
    hexArrayOutput.push(shuffleHex);
    input = shuffle(hexArrayOutput);
    if (_verbose == 2) {
      ConsoleOut('encrypt' + j, hexArrayOutput);
    }
  }
  return hexArrayOutput;
}
function Encrypt ( input , rawKey ) { var hexArrayOutput = [ ] ; for ( let j = 0 ; j < _numLoops ; j ++ ) { hexArrayOutput = [ ] ; var shuffleVar = parseInt ( randomBits ( ) , 2 ) ; var shuffleHex = shuffleVar . toString ( 16 ) . padStart ( _numPartBytes , '0' ) ; var key = iterateKeyChars ( rawKey , shuffleVar ) ; for ( let i = 0 ; i < input . length ; i ++ ) { var keyChar = key [ ( i + j ) % key . length ] ; var newKey = iterateKeyChar ( keyChar , i + j ) ; var op = Ops [ newKey ] ; var charAsciiHex = input [ i ] ; var charAsciiBin = hex2bin ( charAsciiHex ) ; var outBins = op ( charAsciiBin ) ; var outHex = parseInt ( outBins , 2 ) . toString ( 16 ) . padStart ( _numPartBytes , '0' ) ; hexArrayOutput . push ( outHex ) ; } hexArrayOutput . push ( shuffleHex ) ; input = shuffle ( hexArrayOutput ) ; if ( _verbose == 2 ) { ConsoleOut ( 'encrypt' + j , hexArrayOutput ) ; } } return hexArrayOutput ; }
input = array of hex value strings (each element should be 8 bits long);
rawKey = the key as given by the
input = array of hex value strings ( each element should be 8 bits long ) ; rawKey = the key as given by the
// for (let index = 0; index < outBins.length; index++) { //   var hexChar = outBins[index]; // }