function generateDigitSetter(){
  var rNum;
  var rChar;
  var rBool;
  var rSep;
  var tempStr = "";
  var max = getRandomMax();
  var iterate = 0;

  for(var i = 0; i < 4; i++) {
    rNum = 0;
    rChar = "";
    rSep = "";
    rBool = 0;
    rNum = getRandomNumber();
    rChar = getRandomLetter();

    while(rBool == 0){
      rBool = getRandomBool();
      if(rBool == 1 && iterate <= max)
        rNum = rNum + getRandomNumber();
      if(iterate > max)
        break;
      iterate++;
    }

    if(rBool == 1)//set number
      switch (rChar){
        case "A":
          rChar = 1;//multiply
          break;
        case "B":
        case "G":
        case "L":
        case "Q":
          rChar = 2;//add
          break;
        case "E":
          rChar = 3;//multiply
          break;
        case "C":
        case "H":
        case "M":
        case "R":
          rChar = 4;//add
          break;
        case "I":
          rChar = 5;//multiply
          break;
        case "D":
        case "J":
        case "N":
        case "S":
          rChar = 6;//add
          break;
        case "O":
          rChar = 7;//multiply
          break;
        case "F":
        case "K":
        case "P":
        case "T":
          rChar = 8;//add
          break;
        case "U":
          rChar = 9;//multiply
          break;
        default:
          rChar = 5;
          break;
      }

    if(i != 3)
      rSep = getRandomSep();

    encodeStore[i] = rChar + rNum;
    tempStr = tempStr + rChar + rNum + rSep;
  }
  return tempStr;
}
//This function returns the digit setter, which is used to encode and decode the user's pin number.
This function returns the digit setter, which is used to encode and decode the user's pin number.
This function returns the digit setter which is used to encode and decode the user ' s pin number .
function generateDigitSetter(){
  var rNum;
  var rChar;
  var rBool;
  var rSep;
  var tempStr = "";
  var max = getRandomMax();
  var iterate = 0;
  for(var i = 0; i < 4; i++) {
    rNum = 0;
    rChar = "";
    rSep = "";
    rBool = 0;
    rNum = getRandomNumber();
    rChar = getRandomLetter();
    while(rBool == 0){
      rBool = getRandomBool();
      if(rBool == 1 && iterate <= max)
        rNum = rNum + getRandomNumber();
      if(iterate > max)
        break;
      iterate++;
    }
    if(rBool == 1)
      switch (rChar){
        case "A":
          rChar = 1;
          break;
        case "B":
        case "G":
        case "L":
        case "Q":
          rChar = 2;
          break;
        case "E":
          rChar = 3;
          break;
        case "C":
        case "H":
        case "M":
        case "R":
          rChar = 4;
          break;
        case "I":
          rChar = 5;
          break;
        case "D":
        case "J":
        case "N":
        case "S":
          rChar = 6;
          break;
        case "O":
          rChar = 7;
          break;
        case "F":
        case "K":
        case "P":
        case "T":
          rChar = 8;
          break;
        case "U":
          rChar = 9;
          break;
        default:
          rChar = 5;
          break;
      }
    if(i != 3)
      rSep = getRandomSep();
    encodeStore[i] = rChar + rNum;
    tempStr = tempStr + rChar + rNum + rSep;
  }
  return tempStr;
}
function generateDigitSetter ( ) { var rNum ; var rChar ; var rBool ; var rSep ; var tempStr = "" ; var max = getRandomMax ( ) ; var iterate = 0 ; for ( var i = 0 ; i < 4 ; i ++ ) { rNum = 0 ; rChar = "" ; rSep = "" ; rBool = 0 ; rNum = getRandomNumber ( ) ; rChar = getRandomLetter ( ) ; while ( rBool == 0 ) { rBool = getRandomBool ( ) ; if ( rBool == 1 && iterate <= max ) rNum = rNum + getRandomNumber ( ) ; if ( iterate > max ) break ; iterate ++ ; } if ( rBool == 1 ) switch ( rChar ) { case "A" : rChar = 1 ; break ; case "B" : case "G" : case "L" : case "Q" : rChar = 2 ; break ; case "E" : rChar = 3 ; break ; case "C" : case "H" : case "M" : case "R" : rChar = 4 ; break ; case "I" : rChar = 5 ; break ; case "D" : case "J" : case "N" : case "S" : rChar = 6 ; break ; case "O" : rChar = 7 ; break ; case "F" : case "K" : case "P" : case "T" : rChar = 8 ; break ; case "U" : rChar = 9 ; break ; default : rChar = 5 ; break ; } if ( i != 3 ) rSep = getRandomSep ( ) ; encodeStore [ i ] = rChar + rNum ; tempStr = tempStr + rChar + rNum + rSep ; } return tempStr ; }
This function returns the digit setter, which is used to encode and decode the user's pin number.
This function returns the digit setter which is used to encode and decode the user ' s pin number .
//set number //multiply //add //multiply //add //multiply //add //multiply //add //multiply