zxcvbn[edit]

zxcvbn[edit]

zxcvbn4j[edit]

jdk-13[edit]

Sample for zxcvbn4j[edit]

CheckPass.java[edit]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import com.nulabinc.zxcvbn.*;

class CheckPass
{
   public static void main(String[] args)
   {
       String str = null;
       double score = 0.0;

       Zxcvbn zxcvbn = new Zxcvbn();
       InputStreamReader ist = new InputStreamReader(System.in);
       BufferedReader buf = new BufferedReader(ist);

       try {
           System.err.print("Input String: ");
           str = buf.readLine();
           while(str!=null) {
               Strength strength = zxcvbn.measure(str);
               //score = strength.getGuesses();
               score = strength.getGuessesLog10();
               System.out.println("[" + str + "] is " + score);
               System.err.print("\nInput String : ");
               str = buf.readLine();
           }
       }
       catch (IOException e) {
           e.printStackTrace();
       }
   }
}
コンパイル&実行[edit]
javac -classpath ./zxcvbn-1.3.0.jar CheckPass.java
java -classpath .:./zxcvbn-1.3.0.jar CheckPass

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 ページ一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2025-04-15 (火) 19:47:19