#author("2025-04-15T10:47:19+00:00","default:iseki","iseki") ** zxcvbn [#e3c6d4f5] - パスワードの複雑さを計算するツール *** zxcvbn [#y8272e23] - https://github.com/dropbox/zxcvbn - パスワードの複雑さを計算するツール - Dropbox社製 - Java Script *** zxcvbn4j [#b663ab8c] - zxcvbn を改造 - サーバサイド用 Java - https://nulab.com/ja/blog/nulab/password-strength/ - https://github.com/nulab/zxcvbn4j **** jdk-13 [#a6a1f7b4] - jdk-13 ではエラーを起こす (2019 10/22) - jdk-8 は OK *** Sample for zxcvbn4j [#vbc939b9] **** CheckPass.java [#g004c8dc] 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(); } } } **** コンパイル&実行 [#ja8d4350] javac -classpath ./zxcvbn-1.3.0.jar CheckPass.java java -classpath .:./zxcvbn-1.3.0.jar CheckPass