📄 digesttool.html
字号:
<A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/DigestTool.html#DigestTool()">DigestTool</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/DigestTool.html#DigestTool(java.lang.String)">DigestTool</A></B>(java.lang.String algorithmType)</CODE><BR> </TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../net/jxta/impl/id/binaryID/PeerGroupBinaryID.html" title="class in net.jxta.impl.id.binaryID">PeerGroupBinaryID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/DigestTool.html#createPeerGroupID(net.jxta.peergroup.PeerGroupID, java.lang.String, java.lang.String)">createPeerGroupID</A></B>(<A HREF="../../../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup">PeerGroupID</A> parentPeerGroupID, java.lang.String clearTextID, java.lang.String function)</CODE><BR> Create a PeerGroupID based on the BinaryID type with a digest of the clearTextID and function.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../net/jxta/impl/id/binaryID/PeerBinaryID.html" title="class in net.jxta.impl.id.binaryID">PeerBinaryID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/DigestTool.html#createPeerID(net.jxta.peergroup.PeerGroupID, java.lang.String, java.lang.String)">createPeerID</A></B>(<A HREF="../../../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup">PeerGroupID</A> peerGroupID, java.lang.String clearTextID, java.lang.String function)</CODE><BR> Create a PeerID based on the BinaryID type with a digest of the clearTextID and function.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../net/jxta/impl/id/binaryID/PipeBinaryID.html" title="class in net.jxta.impl.id.binaryID">PipeBinaryID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/DigestTool.html#createPipeID(net.jxta.peergroup.PeerGroupID, java.lang.String, java.lang.String)">createPipeID</A></B>(<A HREF="../../../../../net/jxta/peergroup/PeerGroupID.html" title="class in net.jxta.peergroup">PeerGroupID</A> peerGroupID, java.lang.String clearTextID, java.lang.String function)</CODE><BR> Create a PipeID based on the BinaryID type with a digest of the clearTextID and function.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/DigestTool.html#generateHash(java.lang.String)">generateHash</A></B>(java.lang.String clearTextID)</CODE><BR> Generates a SHA-1 digest hash of the string: clearTextID.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/DigestTool.html#generateHash(java.lang.String, java.lang.String)">generateHash</A></B>(java.lang.String clearTextID, java.lang.String function)</CODE><BR> Generates an SHA-1 digest hash of the string: clearTextID+"-"+function or: clearTextID if function was blank.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/DigestTool.html#generateHashString(java.lang.String)">generateHashString</A></B>(java.lang.String clearTextID)</CODE><BR> Generates a Base64 encoded string of an SHA-1 digest hash of the string: clearTextID.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/DigestTool.html#generateHashString(java.lang.String, java.lang.String)">generateHashString</A></B>(java.lang.String clearTextID, java.lang.String function)</CODE><BR> Generates a Base64 encoded string of an SHA-1 digest hash of the string: clearTextID+"-"+function or: clearTextID if function was blank.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/DigestTool.html#test(java.lang.String, byte[])">test</A></B>(java.lang.String clearTextID, byte[] testHash)</CODE><BR> Compares a clear text code or ID with a candidate hash code. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/DigestTool.html#test(java.lang.String, java.lang.String)">test</A></B>(java.lang.String clearTextID, java.lang.String testHash)</CODE><BR> Compares a clear text code or ID with a candidate hash code. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/id/binaryID/DigestTool.html#test(java.lang.String, java.lang.String, java.lang.String)">test</A></B>(java.lang.String clearTextID, java.lang.String function, java.lang.String testHash)</CODE><BR> Generates an SHA-1 digest hash of the string: clearTextID.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="debug"><!-- --></A><H3>debug</H3><PRE>public static final boolean <B>debug</B></PRE><DL><DD>varaible used for conditional compile of debug printing.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.DigestTool.debug">Constant Field Values</A></DL></DL><HR><A NAME="SHAOne"><!-- --></A><H3>SHAOne</H3><PRE>public static final java.lang.String <B>SHAOne</B></PRE><DL><DD>Defualt SHA-1 digest algorithm type. This is a 20 byte hash function (note: that MD5 is only 16 so we don't use it).<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.DigestTool.SHAOne">Constant Field Values</A></DL></DL><HR><A NAME="SHA128"><!-- --></A><H3>SHA128</H3><PRE>public static final java.lang.String <B>SHA128</B></PRE><DL><DD>SHA-128 digest algorithm type. This is a 128 bit hash function (note: must have another provider registered to use).<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.DigestTool.SHA128">Constant Field Values</A></DL></DL><HR><A NAME="SHA256"><!-- --></A><H3>SHA256</H3><PRE>public static final java.lang.String <B>SHA256</B></PRE><DL><DD>SHA-256 digest algorithm type. This is a 256 bit hash function (note: must have another provider registered to use).<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.DigestTool.SHA256">Constant Field Values</A></DL></DL><HR><A NAME="SHA384"><!-- --></A><H3>SHA384</H3><PRE>public static final java.lang.String <B>SHA384</B></PRE><DL><DD>SHA-384 digest algorithm type. This is a 384 bit hash function (note: must have another provider registered to use).<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.DigestTool.SHA384">Constant Field Values</A></DL></DL><HR><A NAME="SHA512"><!-- --></A><H3>SHA512</H3><PRE>public static final java.lang.String <B>SHA512</B></PRE><DL><DD>SHA-512 digest algorithm type. This is a 512 bit hash function (note: must have another provider registered to use).<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.DigestTool.SHA512">Constant Field Values</A></DL></DL><HR><A NAME="functionSeperator"><!-- --></A><H3>functionSeperator</H3><PRE>public final java.lang.String <B>functionSeperator</B></PRE><DL><DD>Tilde character used to seperate candidate strings from a function.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.jxta.impl.id.binaryID.DigestTool.functionSeperator">Constant Field Values</A></DL></DL><HR><A NAME="algorithmType"><!-- --></A><H3>algorithmType</H3><PRE>java.lang.String <B>algorithmType</B></PRE><DL><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -