📄 digesttool.html
字号:
</TR></TABLE><A NAME="DigestTool()"><!-- --></A><H3>DigestTool</H3><PRE>public <B>DigestTool</B>()</PRE><DL></DL><HR><A NAME="DigestTool(java.lang.String)"><!-- --></A><H3>DigestTool</H3><PRE>public <B>DigestTool</B>(java.lang.String algorithmType)</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="createPipeID(net.jxta.peergroup.PeerGroupID, java.lang.String, java.lang.String)"><!-- --></A><H3>createPipeID</H3><PRE>public final <A HREF="../../../../../net/jxta/impl/id/binaryID/PipeBinaryID.html" title="class in net.jxta.impl.id.binaryID">PipeBinaryID</A> <B>createPipeID</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)</PRE><DL><DD>Create a PipeID based on the BinaryID type with a digest of the clearTextID and function.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>peerGroupID</CODE> - Parent peer group ID.<DD><CODE>clearTextID</CODE> - String used as the significant part of the address<DD><CODE>function</CODE> - String used to diferentiate different clearTextID addresses (can be null).<DT><B>Returns:</B><DD>PipeBinaryID with the digest hash of the string: clearTextID+"~"+function.</DL></DD></DL><HR><A NAME="createPeerGroupID(net.jxta.peergroup.PeerGroupID, java.lang.String, java.lang.String)"><!-- --></A><H3>createPeerGroupID</H3><PRE>public final <A HREF="../../../../../net/jxta/impl/id/binaryID/PeerGroupBinaryID.html" title="class in net.jxta.impl.id.binaryID">PeerGroupBinaryID</A> <B>createPeerGroupID</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)</PRE><DL><DD>Create a PeerGroupID based on the BinaryID type with a digest of the clearTextID and function.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>clearTextID</CODE> - String used as the significant part of the address<DD><CODE>function</CODE> - String used to diferentiate different clearTextID addresses (can be null).<DT><B>Returns:</B><DD>PeerGroupBinaryID with the digest hash of the string: clearTextID+"~"+function.</DL></DD></DL><HR><A NAME="createPeerID(net.jxta.peergroup.PeerGroupID, java.lang.String, java.lang.String)"><!-- --></A><H3>createPeerID</H3><PRE>public final <A HREF="../../../../../net/jxta/impl/id/binaryID/PeerBinaryID.html" title="class in net.jxta.impl.id.binaryID">PeerBinaryID</A> <B>createPeerID</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)</PRE><DL><DD>Create a PeerID based on the BinaryID type with a digest of the clearTextID and function.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>peerGroupID</CODE> - Parent peer group ID.<DD><CODE>clearTextID</CODE> - String used as the significant part of the address<DD><CODE>function</CODE> - String used to diferentiate different clearTextID addresses (can be null).<DT><B>Returns:</B><DD>PeerBinaryID with the digest hash of the string: clearTextID+"~"+function.</DL></DD></DL><HR><A NAME="generateHashString(java.lang.String)"><!-- --></A><H3>generateHashString</H3><PRE>public final java.lang.String <B>generateHashString</B>(java.lang.String clearTextID)</PRE><DL><DD>Generates a Base64 encoded string of an SHA-1 digest hash of the string: clearTextID.<p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>clearTextID</CODE> - A string that is to be hashed. This can be any string used for hashing or hiding data.<DT><B>Returns:</B><DD>Base64 encoded string containing the hash of the string: clearTextID.</DL></DD></DL><HR><A NAME="generateHashString(java.lang.String, java.lang.String)"><!-- --></A><H3>generateHashString</H3><PRE>public final java.lang.String <B>generateHashString</B>(java.lang.String clearTextID, java.lang.String function)</PRE><DL><DD>Generates a Base64 encoded string of an SHA-1 digest hash of the string: clearTextID+"-"+function or: clearTextID if function was blank.<p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>clearTextID</CODE> - A string that is to be hashed. This can be any string used for hashing or hiding data.<DD><CODE>function</CODE> - A function related to the clearTextID string. This is used to create a hash associated with clearTextID so that it is a uique code.<DT><B>Returns:</B><DD>Base64 encoded string containing the hash of the string: clearTextID+"-"+function or clearTextID if function was blank.</DL></DD></DL><HR><A NAME="generateHash(java.lang.String)"><!-- --></A><H3>generateHash</H3><PRE>public final byte[] <B>generateHash</B>(java.lang.String clearTextID)</PRE><DL><DD>Generates a SHA-1 digest hash of the string: clearTextID.<p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>clearTextID</CODE> - A string that is to be hashed. This can be any string used for hashing or hiding data.<DT><B>Returns:</B><DD>String containing the hash of the string: clearTextID.</DL></DD></DL><HR><A NAME="generateHash(java.lang.String, java.lang.String)"><!-- --></A><H3>generateHash</H3><PRE>public final byte[] <B>generateHash</B>(java.lang.String clearTextID, java.lang.String function)</PRE><DL><DD>Generates an SHA-1 digest hash of the string: clearTextID+"-"+function or: clearTextID if function was blank.<p> Note that the SHA-1 used only creates a 20 byte hash.<p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>clearTextID</CODE> - A string that is to be hashed. This can be any string used for hashing or hiding data.<DD><CODE>function</CODE> - A function related to the clearTextID string. This is used to create a hash associated with clearTextID so that it is a uique code.<DT><B>Returns:</B><DD>array of bytes containing the hash of the string: clearTextID+"-"+function or clearTextID if function was blank. Can return null if SHA-1 does not exist on platform.</DL></DD></DL><HR><A NAME="test(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>test</H3><PRE>public final boolean <B>test</B>(java.lang.String clearTextID, java.lang.String function, java.lang.String testHash)</PRE><DL><DD>Generates an SHA-1 digest hash of the string: clearTextID.<p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>clearTextID</CODE> - A string that is to be hashed. This can be any string used for hashing or hiding data.<DT><B>Returns:</B><DD>String containing the hash of the string: clearTextID.</DL></DD></DL><HR><A NAME="test(java.lang.String, java.lang.String)"><!-- --></A><H3>test</H3><PRE>public final boolean <B>test</B>(java.lang.String clearTextID, java.lang.String testHash)</PRE><DL><DD>Compares a clear text code or ID with a candidate hash code. This is used to confirm that the clearTextID can be successfully converted to the hash.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>clearTextID</CODE> - A string that is to be hashed. This can be any string used for hashing or hiding data.<DD><CODE>testHash</CODE> - A string of hashed string.<DT><B>Returns:</B><DD>true if the hash created from clearTextID is equal to the testHash string.Can return false if SHA-1 does not exist on platform.</DL></DD></DL><HR><A NAME="test(java.lang.String, byte[])"><!-- --></A><H3>test</H3><PRE>public final boolean <B>test</B>(java.lang.String clearTextID, byte[] testHash)</PRE><DL><DD>Compares a clear text code or ID with a candidate hash code. This is used to confirm that the clearTextID can be successfully converted to the hash.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>clearTextID</CODE> - A string that is to be hashed. This can be any string used for hashing or hiding data.<DD><CODE>testHash</CODE> - A string of hashed string.<DT><B>Returns:</B><DD>true if the hash created from clearTextID is equal to the testHash string.Can return false if SHA-1 does not exist on platform.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DigestTool.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>JXTA J2SE</EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../net/jxta/impl/id/binaryID/CodatBinaryID.html" title="class in net.jxta.impl.id.binaryID"><B>PREV CLASS</B></A> <A HREF="../../../../../net/jxta/impl/id/binaryID/IDFormat.html" title="class in net.jxta.impl.id.binaryID"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="DigestTool.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -