Password Generator (in: None, out: String type)

Generates a password from the specified combination of character strings and stores it in a data item. It can be used for "Issuing new user account" of the information system.

    A. Set Candidates (e.g. "acfghjkmnrsuvwxyzACFGHJKMNRSUVWXYZ")Single-line inputRequired
    a. Set Number of A-Category (e.g. "4")Single-line inputRequired
    B. Set Candidates (e.g. "abcdefghjkmnpqrstuvwxyz")Single-line input
    b. Set Number of B-Category (e.g. "4")Single-line input
    C. Set Candidates (e.g. "ABCDEFGHJKLMNPQRSTUVWXYZ")Single-line input
    c. Set Number of C-Category (e.g. "4")Single-line input
    D. Set Candidates (e.g. "#$%&+-")Single-line input
    d. Set Number of D-Category (e.g. "4")Single-line input
    E. Select STRING DATA for New Password (update)Data selectStringRequired
    -variable namevariable label
    Aconf_PassSetASet Candidates (e.g. "acfghjkmnrsuvwxyzACFGHJKMNRSUVWXYZ")
    aconf_PassNumASet Number of A-Category (e.g. "4")
    Bconf_PassSetBSet Candidates (e.g. "abcdefghjkmnpqrstuvwxyz")
    bconf_PassNumBSet Number of B-Category (e.g. "4")
    Cconf_PassSetCSet Candidates (e.g. "ABCDEFGHJKLMNPQRSTUVWXYZ")
    cconf_PassNumCSet Number of C-Category (e.g. "4")
    Dconf_PassSetDSet Candidates (e.g. "#$%&+-")
    dconf_PassNumDSet Number of D-Category (e.g. "4")
    Econf_DataIdESelect STRING DATA for New Password (update)
    // Random Password Generator (ver. 20160909)
    // (c) 2016, Questetra, Inc. (the MIT License)
    
    //// == 工程コンフィグの参照 / Config Retrieving ==
    var passSetA = configs.get( "conf_PassSetA" ) + "";
    var passNumA = configs.get( "conf_PassNumA" ) - 0 ;
    var passSetB = configs.get( "conf_PassSetB" ) + "";
    var passNumB = configs.get( "conf_PassNumB" ) - 0 ;
    var passSetC = configs.get( "conf_PassSetC" ) + "";
    var passNumC = configs.get( "conf_PassNumC" ) - 0 ;
    var passSetD = configs.get( "conf_PassSetD" ) + "";
    var passNumD = configs.get( "conf_PassNumD" ) - 0 ;
    var dataIdE = configs.get( "conf_DataIdE" );
    
    //// == ワークフローデータの参照 / Data Retrieving ==
    // none
    
    //// == 演算 / Calculating ==
    var myPassword = "";
    for(var i=0; i < passNumA; i++){
      myPassword += passSetA.charAt( Math.floor( Math.random() * passSetA.length ) );
    }
    for(var i=0; i < passNumB; i++){
      myPassword += passSetB.charAt( Math.floor( Math.random() * passSetB.length ) );
    }
    for(var i=0; i < passNumC; i++){
      myPassword += passSetC.charAt( Math.floor( Math.random() * passSetC.length ) );
    }
    for(var i=0; i < passNumD; i++){
      myPassword += passSetD.charAt( Math.floor( Math.random() * passSetD.length ) );
    }
    
    // shuffle (Fisher-Yates)
    var tmpArray = myPassword.split("");
    var j = tmpArray.length;
    while ( j > 1 ) { 
      var k = Math.floor(Math.random() * j );
      j = j - 1;
      if (j == k) continue;
      var tmp = tmpArray[j];
      tmpArray[j] = tmpArray[k];
      tmpArray[k] = tmp;
    } 
    
    //// == ワークフローデータへの代入 / Data Updating ==
    retVal.put( dataIdE, tmpArray.join("") );
    
    noneCharacters to be selected “a” times from A, “b” times from B, “c” times from C, “d” times from the D, shuffled and stored in the selected data items in EExclude confusing characters such as lowercase “l” and number “1” from candidates, if you do not want them to be appeared. If you want to be sure to include a symbol, create a category of symbolic character only, and set its Appearance frequency as one or more.