?? sha1.html
字號:
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="SHA1.html#doTest()">doTest</A></B>()</CODE>
<BR>
Just a test function to output the results of the 6 working funcions to the standard out.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="SHA1.html#hex_hmac_sha1(java.lang.String, java.lang.String)">hex_hmac_sha1</A></B>(java.lang.String key, java.lang.String data)</CODE>
<BR>
This is one of the functions you'll usually want to call It take a string arguments and returns either hex or base-64 encoded strings Creation date: (3/27/2004 6:05:10 PM)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="SHA1.html#hex_sha1(java.lang.String)">hex_sha1</A></B>(java.lang.String s)</CODE>
<BR>
This is one of the functions you'll usually want to call It take a string argument and returns either hex or base-64 encoded strings Creation date: (3/27/2004 6:05:10 PM)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="SHA1.html#rol(int, int)">rol</A></B>(int num, int cnt)</CODE>
<BR>
Bitwise rotate a 32-bit number to the left.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="SHA1.html#safe_add(int, int)">safe_add</A></B>(int x, int y)</CODE>
<BR>
Add ints, wrapping at 2^32.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="SHA1.html#sha1_ft(int, int, int, int)">sha1_ft</A></B>(int t, int b, int c, int d)</CODE>
<BR>
Perform the appropriate triplet combination function for the current Creation date: (3/26/2004 1:05:01 PM)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="SHA1.html#sha1_kt(int)">sha1_kt</A></B>(int t)</CODE>
<BR>
Determine the appropriate additive constant for the current iteration Creation date: (3/26/2004 1:05:01 PM)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="SHA1.html#sha1_vm_test()">sha1_vm_test</A></B>()</CODE>
<BR>
This is a boolean returnig test function that exists in the sha1.js library.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="SHA1.html#str_hmac_sha1(java.lang.String, java.lang.String)">str_hmac_sha1</A></B>(java.lang.String key, java.lang.String data)</CODE>
<BR>
This is one of the functions you'll usually want to call It take a string arguments and returns either hex or base-64 encoded strings Creation date: (3/26/2004 1:05:01 PM)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="SHA1.html#str_sha1(java.lang.String)">str_sha1</A></B>(java.lang.String s)</CODE>
<BR>
This is one of the functions you'll usually want to call It take a string argument and returns either hex or base-64 encoded strings Creation date: (3/26/2004 1:05:01 PM)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static int[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="SHA1.html#str2binb(java.lang.String)">str2binb</A></B>(java.lang.String str)</CODE>
<BR>
Convert an 8-bit or 16-bit string to an array of big-endian words In 8-bit function, characters >255 have their hi-byte silently ignored.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static int[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="SHA1.html#strechBinArray(int[], int)">strechBinArray</A></B>(int[] oldbin, int size)</CODE>
<BR>
increase an int array to a desired sized + 1 while keeping the old values.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><clinit>,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="hexcase"><!-- --></A><H3>
hexcase</H3>
<PRE>
private static final boolean <B>hexcase</B></PRE>
<DL>
</DL>
<HR>
<A NAME="b64pad"><!-- --></A><H3>
b64pad</H3>
<PRE>
private static final java.lang.String <B>b64pad</B></PRE>
<DL>
</DL>
<HR>
<A NAME="chrsz"><!-- --></A><H3>
chrsz</H3>
<PRE>
private static final int <B>chrsz</B></PRE>
<DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="SHA1()"><!-- --></A><H3>
SHA1</H3>
<PRE>
public <B>SHA1</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="b64_hmac_sha1(java.lang.String, java.lang.String)"><!-- --></A><H3>
b64_hmac_sha1</H3>
<PRE>
public static java.lang.String <B>b64_hmac_sha1</B>(java.lang.String key, java.lang.String data)</PRE>
<DL>
<DD>This is one of the functions you'll usually want to call It take a string arguments and returns either hex or base-64 encoded strings Creation date: (3/27/2004 6:05:10 PM)<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - java.lang.String<DD><CODE>data</CODE> - java.lang.String<DT><B>Returns:</B><DD>java.lang.String</DL>
</DD>
</DL>
<HR>
<A NAME="b64_sha1(java.lang.String)"><!-- --></A><H3>
b64_sha1</H3>
<PRE>
public static java.lang.String <B>b64_sha1</B>(java.lang.String s)</PRE>
<DL>
<DD>This is one of the functions you'll usually want to call It take a string argument and returns either hex or base-64 encoded strings Creation date: (3/27/2004 6:05:10 PM)<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - java.lang.String<DT><B>Returns:</B><DD>java.lang.String</DL>
</DD>
</DL>
<HR>
<A NAME="binb2b64(int[])"><!-- --></A><H3>
binb2b64</H3>
<PRE>
private static java.lang.String <B>binb2b64</B>(int[] binarray)</PRE>
<DL>
<DD>Convert an array of big-endian words to a base-64 string Creation date: (3/27/2004 6:05:10 PM)<DD><DL>
<DT><B>Parameters:</B><DD><CODE>binarray</CODE> - int[]<DT><B>Returns:</B><DD>java.lang.String</DL>
</DD>
</DL>
<HR>
<A NAME="binb2hex(int[])"><!-- --></A><H3>
binb2hex</H3>
<PRE>
private static java.lang.String <B>binb2hex</B>(int[] binarray)</PRE>
<DL>
<DD>Convert an array of big-endian words to a hex string. Creation date: (3/27/2004 6:05:10 PM)<DD><DL>
<DT><B>Parameters:</B><DD><CODE>binarray</CODE> - int[]<DT><B>Returns:</B><DD>java.lang.String</DL>
</DD>
</DL>
<HR>
<A NAME="binb2str(int[])"><!-- --></A><H3>
binb2str</H3>
<PRE>
private static java.lang.String <B>binb2str</B>(int[] bin)</PRE>
<DL>
<DD>Convert an array of big-endian words to a string Creation date: (3/27/2004 6:05:10 PM)<DD><DL>
<DT><B>Parameters:</B><DD><CODE>bin</CODE> - int[]<DT><B>Returns:</B><DD>java.lang.String</DL>
</DD>
</DL>
<HR>
<A NAME="bit_rol(int, int)"><!-- --></A><H3>
bit_rol</H3>
<PRE>
private static int <B>bit_rol</B>(int num, int cnt)</PRE>
<DL>
<DD>Bitwise rotate a 32-bit number to the left. Creation date: (3/26/2004 1:05:01 PM)<DD><DL>
<DT><B>Parameters:</B><DD><CODE>num</CODE> - int<DD><CODE>cnt</CODE> - int<DT><B>Returns:</B><DD>int</DL>
</DD>
</DL>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -