WJLHashAlgorithm 2.0.0.JArの応用方法
2084 ワード
次のパッケージのjarパッケージをeclipseにインポートします:WJLhashAlgorithm 2.0.0.JArはmainテストに合格し、プログラムは以下の通りです.
皆さん、盲検を歓迎します.
public static void main(String[] args) {
//Input parameter is the output length of the Hash which is changeable
WJLHashAlgorithm hashAlgorithm=new WJLHashAlgorithm(32); // 32 256 , , 16*8=128 37*8=296 , 。
//Add Secret key
hashAlgorithm.setSecretKey(1);// , 0-999999 。
String string= hashAlgorithm.encrypt("abc");// "abc"
System.out.print(string);
}
皆さん、盲検を歓迎します.