function encode(input) {
  var nameGenNum = getNameGenNum();
  var encodeStr = "";
  var encodeName = "";
  var encodeEnd = "";
  var rSep = "";
  var a = 0;
  var operator = "";
  var operand1 = "";
  var operand2 = "";
  var operandResult = 0;

  encodeStr = encodeStr + generateDigitSetter();
  encodeStr = encodeStr + ":";
  while (encodeNameBool == false) {
    for (var i = 0; i < nameGenNum; i++) {
      encodeName = encodeName + getRandomAlphabet();
    }
    nameGenNum = getNameGenNum();
    checkEncodeName(encodeName);
  }
  encodeNameBool = false;
  encodeStr = encodeStr + encodeName;
  encodeStr = encodeStr + ":";
  for(var i = 0; i < input.length; i++, a++){
    rSep = "";
    if(a > 3) {
      a = 0;
    }
    operator = whatIsOp(encodeStore[a].charAt(0));
    operand1 = encodeStore[a].slice(1, encodeStore[a].length);
    if (operator == "0") {
      operand1 = parseInt(operand1);
      operand2 = parseInt(input.charAt(i));
      operandResult = operand1 * operand2;
    } else {
      operand1 = parseInt(operand1);
      operand2 = parseInt(input.charAt(i));
      operandResult = operand1 + operand2;
    }
    if(i < input.length-1) {
      rSep = getRandomLetter();
    }
    encodeEnd = encodeEnd + operandResult + rSep;
  }
  encodeStr = encodeStr + encodeEnd;

  return encodeStr;
}
//This function encodes a user's pin number as a string of numbers, letters, and colons.
This function encodes a user's pin number as a string of numbers, letters, and colons.
This function encodes a user ' s pin number as a string of numbers letters and colons .
function encode(input) {
  var nameGenNum = getNameGenNum();
  var encodeStr = "";
  var encodeName = "";
  var encodeEnd = "";
  var rSep = "";
  var a = 0;
  var operator = "";
  var operand1 = "";
  var operand2 = "";
  var operandResult = 0;
  encodeStr = encodeStr + generateDigitSetter();
  encodeStr = encodeStr + ":";
  while (encodeNameBool == false) {
    for (var i = 0; i < nameGenNum; i++) {
      encodeName = encodeName + getRandomAlphabet();
    }
    nameGenNum = getNameGenNum();
    checkEncodeName(encodeName);
  }
  encodeNameBool = false;
  encodeStr = encodeStr + encodeName;
  encodeStr = encodeStr + ":";
  for(var i = 0; i < input.length; i++, a++){
    rSep = "";
    if(a > 3) {
      a = 0;
    }
    operator = whatIsOp(encodeStore[a].charAt(0));
    operand1 = encodeStore[a].slice(1, encodeStore[a].length);
    if (operator == "0") {
      operand1 = parseInt(operand1);
      operand2 = parseInt(input.charAt(i));
      operandResult = operand1 * operand2;
    } else {
      operand1 = parseInt(operand1);
      operand2 = parseInt(input.charAt(i));
      operandResult = operand1 + operand2;
    }
    if(i < input.length-1) {
      rSep = getRandomLetter();
    }
    encodeEnd = encodeEnd + operandResult + rSep;
  }
  encodeStr = encodeStr + encodeEnd;
  return encodeStr;
}
function encode ( input ) { var nameGenNum = getNameGenNum ( ) ; var encodeStr = "" ; var encodeName = "" ; var encodeEnd = "" ; var rSep = "" ; var a = 0 ; var operator = "" ; var operand1 = "" ; var operand2 = "" ; var operandResult = 0 ; encodeStr = encodeStr + generateDigitSetter ( ) ; encodeStr = encodeStr + ":" ; while ( encodeNameBool == false ) { for ( var i = 0 ; i < nameGenNum ; i ++ ) { encodeName = encodeName + getRandomAlphabet ( ) ; } nameGenNum = getNameGenNum ( ) ; checkEncodeName ( encodeName ) ; } encodeNameBool = false ; encodeStr = encodeStr + encodeName ; encodeStr = encodeStr + ":" ; for ( var i = 0 ; i < input . length ; i ++ , a ++ ) { rSep = "" ; if ( a > 3 ) { a = 0 ; } operator = whatIsOp ( encodeStore [ a ] . charAt ( 0 ) ) ; operand1 = encodeStore [ a ] . slice ( 1 , encodeStore [ a ] . length ) ; if ( operator == "0" ) { operand1 = parseInt ( operand1 ) ; operand2 = parseInt ( input . charAt ( i ) ) ; operandResult = operand1 * operand2 ; } else { operand1 = parseInt ( operand1 ) ; operand2 = parseInt ( input . charAt ( i ) ) ; operandResult = operand1 + operand2 ; } if ( i < input . length - 1 ) { rSep = getRandomLetter ( ) ; } encodeEnd = encodeEnd + operandResult + rSep ; } encodeStr = encodeStr + encodeEnd ; return encodeStr ; }
This function encodes a user's pin number as a string of numbers, letters, and colons.
This function encodes a user ' s pin number as a string of numbers letters and colons .