blob: c8e96a681cb23897c581285da66b4c11266f1636 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_65) on Fri Mar 04 17:58:55 EST 2016 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
AbstractHash (Apache Shiro 1.2.4 API)
</TITLE>
<META NAME="date" CONTENT="2016-03-04">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="AbstractHash (Apache Shiro 1.2.4 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_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>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AbstractHash.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../org/apache/shiro/crypto/hash/ConfigurableHashService.html" title="interface in org.apache.shiro.crypto.hash"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/shiro/crypto/hash/AbstractHash.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="AbstractHash.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.apache.shiro.codec.CodecSupport">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.shiro.crypto.hash</FONT>
<BR>
Class AbstractHash</H2>
<PRE>
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html" title="class in org.apache.shiro.codec">org.apache.shiro.codec.CodecSupport</A>
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.shiro.crypto.hash.AbstractHash</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>, <A HREF="../../../../../org/apache/shiro/crypto/hash/Hash.html" title="interface in org.apache.shiro.crypto.hash">Hash</A>, <A HREF="../../../../../org/apache/shiro/util/ByteSource.html" title="interface in org.apache.shiro.util">ByteSource</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/shiro/crypto/hash/SimpleHash.html" title="class in org.apache.shiro.crypto.hash">SimpleHash</A></DD>
</DL>
<HR>
<B>Deprecated.</B>&nbsp;<I>in Shiro 1.1 in favor of using the concrete <A HREF="../../../../../org/apache/shiro/crypto/hash/SimpleHash.html" title="class in org.apache.shiro.crypto.hash"><CODE>SimpleHash</CODE></A> implementation directly.</I>
<P>
<DL>
<DT><PRE><FONT SIZE="-1"><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</A>
</FONT>public abstract class <A HREF="../../../../../src-html/org/apache/shiro/crypto/hash/AbstractHash.html#line.47"><B>AbstractHash</B></A><DT>extends <A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html" title="class in org.apache.shiro.codec">CodecSupport</A><DT>implements <A HREF="../../../../../org/apache/shiro/crypto/hash/Hash.html" title="interface in org.apache.shiro.crypto.hash">Hash</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DL>
</PRE>
<P>
Provides a base for all Shiro Hash algorithms with support for salts and multiple hash iterations.
<p/>
Read
<a href="http://www.owasp.org/index.php/Hashing_Java" target="blank">http://www.owasp.org/index.php/Hashing_Java</a>
for a good article on the benefits of hashing, including what a 'salt' is as well as why it and multiple hash
iterations can be useful.
<p/>
This class and its subclasses support hashing with additional capabilities of salting and multiple iterations via
overloaded constructors.
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>0.9</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../../serialized-form.html#org.apache.shiro.crypto.hash.AbstractHash">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
</TABLE>
&nbsp;<A NAME="nested_classes_inherited_from_class_org.apache.shiro.util.ByteSource"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Nested classes/interfaces inherited from interface org.apache.shiro.util.<A HREF="../../../../../org/apache/shiro/util/ByteSource.html" title="interface in org.apache.shiro.util">ByteSource</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/shiro/util/ByteSource.Util.html" title="class in org.apache.shiro.util">ByteSource.Util</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_org.apache.shiro.codec.CodecSupport"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class org.apache.shiro.codec.<A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html" title="class in org.apache.shiro.codec">CodecSupport</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html#PREFERRED_ENCODING">PREFERRED_ENCODING</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#AbstractHash()">AbstractHash</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Creates an new instance without any of its properties set (no hashing is performed).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#AbstractHash(java.lang.Object)">AbstractHash</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;source)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Creates a hash of the specified <code>source</code> with no <code>salt</code> using a single hash iteration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#AbstractHash(java.lang.Object, java.lang.Object)">AbstractHash</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;source,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;salt)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Creates a hash of the specified <code>source</code> using the given <code>salt</code> using a single hash iteration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#AbstractHash(java.lang.Object, java.lang.Object, int)">AbstractHash</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;source,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;salt,
int&nbsp;hashIterations)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Creates a hash of the specified <code>source</code> using the given <code>salt</code> a total of
<code>hashIterations</code> times.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#equals(java.lang.Object)">equals</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;o)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Returns <code>true</code> if the specified object is a Hash and its <A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#getBytes()"><CODE>byte array</CODE></A> is identical to
this Hash's byte array, <code>false</code> otherwise.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract &nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#getAlgorithmName()">getAlgorithmName</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Implemented by subclasses, this specifies the <A HREF="http://java.sun.com/javase/6/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><CODE>MessageDigest</CODE></A> algorithm name
to use when performing the hash.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#getBytes()">getBytes</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Returns the wrapped byte array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#getDigest(java.lang.String)">getDigest</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;algorithmName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Returns the JDK MessageDigest instance to use for executing the hash.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#hash(byte[])">hash</A></B>(byte[]&nbsp;bytes)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Hashes the specified byte array without a salt for a single iteration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#hash(byte[], byte[])">hash</A></B>(byte[]&nbsp;bytes,
byte[]&nbsp;salt)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Hashes the specified byte array using the given <code>salt</code> for a single iteration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#hash(byte[], byte[], int)">hash</A></B>(byte[]&nbsp;bytes,
byte[]&nbsp;salt,
int&nbsp;hashIterations)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Hashes the specified byte array using the given <code>salt</code> for the specified number of iterations.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#hashCode()">hashCode</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Simply returns toHex().hashCode();</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#setBytes(byte[])">setBytes</A></B>(byte[]&nbsp;alreadyHashedBytes)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Sets the raw bytes stored by this hash instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#toBase64()">toBase64</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Returns a Base64-encoded string of the underlying <A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#getBytes()"><CODE>byte array</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#toHex()">toHex</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Returns a hex-encoded string of the underlying <A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#getBytes()"><CODE>byte array</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#toString()">toString</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;Simple implementation that merely returns <A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#toHex()"><CODE>toHex()</CODE></A>.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.shiro.codec.CodecSupport"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class org.apache.shiro.codec.<A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html" title="class in org.apache.shiro.codec">CodecSupport</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html#isByteSource(java.lang.Object)">isByteSource</A>, <A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html#objectToBytes(java.lang.Object)">objectToBytes</A>, <A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html#objectToString(java.lang.Object)">objectToString</A>, <A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html#toBytes(char[])">toBytes</A>, <A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html#toBytes(char[], java.lang.String)">toBytes</A>, <A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html#toBytes(java.io.File)">toBytes</A>, <A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html#toBytes(java.io.InputStream)">toBytes</A>, <A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html#toBytes(java.lang.Object)">toBytes</A>, <A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html#toBytes(java.lang.String)">toBytes</A>, <A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html#toBytes(java.lang.String, java.lang.String)">toBytes</A>, <A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html#toChars(byte[])">toChars</A>, <A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html#toChars(byte[], java.lang.String)">toChars</A>, <A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html#toString(byte[])">toString</A>, <A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html#toString(byte[], java.lang.String)">toString</A>, <A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html#toString(java.lang.Object)">toString</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<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">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.shiro.crypto.hash.Hash"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.apache.shiro.crypto.hash.<A HREF="../../../../../org/apache/shiro/crypto/hash/Hash.html" title="interface in org.apache.shiro.crypto.hash">Hash</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/shiro/crypto/hash/Hash.html#getIterations()">getIterations</A>, <A HREF="../../../../../org/apache/shiro/crypto/hash/Hash.html#getSalt()">getSalt</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.shiro.util.ByteSource"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface org.apache.shiro.util.<A HREF="../../../../../org/apache/shiro/util/ByteSource.html" title="interface in org.apache.shiro.util">ByteSource</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../org/apache/shiro/util/ByteSource.html#isEmpty()">isEmpty</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="AbstractHash()"><!-- --></A><H3>
AbstractHash</H3>
<PRE>
public <A HREF="../../../../../src-html/org/apache/shiro/crypto/hash/AbstractHash.html#line.72"><B>AbstractHash</B></A>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Creates an new instance without any of its properties set (no hashing is performed).
<p/>
Because all constructors in this class (except this one) hash the <code>source</code> constructor argument, this
default, no-arg constructor is useful in scenarios when you have a byte array that you know is already hashed and
just want to set the bytes in their raw form directly on an instance. After instantiating the instance with
this default, no-arg constructor, you can then immediately call <A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#setBytes(byte[])"><CODE>setBytes</CODE></A> to have a
fully-initialized instance.
<P>
</DL>
<HR>
<A NAME="AbstractHash(java.lang.Object)"><!-- --></A><H3>
AbstractHash</H3>
<PRE>
public <A HREF="../../../../../src-html/org/apache/shiro/crypto/hash/AbstractHash.html#line.88"><B>AbstractHash</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;source)
throws <A HREF="../../../../../org/apache/shiro/codec/CodecException.html" title="class in org.apache.shiro.codec">CodecException</A></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Creates a hash of the specified <code>source</code> with no <code>salt</code> using a single hash iteration.
<p/>
It is a convenience constructor that merely executes <code>this( source, null, 1);</code>.
<p/>
Please see the
<A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#AbstractHash(java.lang.Object, java.lang.Object, int)"><CODE>AbstractHash(Object,Object,int)</CODE></A>
constructor for the types of Objects that may be passed into this constructor, as well as how to support further
types.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>source</CODE> - the object to be hashed.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/shiro/codec/CodecException.html" title="class in org.apache.shiro.codec">CodecException</A></CODE> - if the specified <code>source</code> cannot be converted into a byte array (byte[]).</DL>
</DL>
<HR>
<A NAME="AbstractHash(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
AbstractHash</H3>
<PRE>
public <A HREF="../../../../../src-html/org/apache/shiro/crypto/hash/AbstractHash.html#line.106"><B>AbstractHash</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;source,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;salt)
throws <A HREF="../../../../../org/apache/shiro/codec/CodecException.html" title="class in org.apache.shiro.codec">CodecException</A></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Creates a hash of the specified <code>source</code> using the given <code>salt</code> using a single hash iteration.
<p/>
It is a convenience constructor that merely executes <code>this( source, salt, 1);</code>.
<p/>
Please see the
<A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#AbstractHash(java.lang.Object, java.lang.Object, int)"><CODE>AbstractHash(Object,Object,int)</CODE></A>
constructor for the types of Objects that may be passed into this constructor, as well as how to support further
types.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>source</CODE> - the source object to be hashed.<DD><CODE>salt</CODE> - the salt to use for the hash
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/shiro/codec/CodecException.html" title="class in org.apache.shiro.codec">CodecException</A></CODE> - if either constructor argument cannot be converted into a byte array.</DL>
</DL>
<HR>
<A NAME="AbstractHash(java.lang.Object, java.lang.Object, int)"><!-- --></A><H3>
AbstractHash</H3>
<PRE>
public <A HREF="../../../../../src-html/org/apache/shiro/crypto/hash/AbstractHash.html#line.129"><B>AbstractHash</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;source,
<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;salt,
int&nbsp;hashIterations)
throws <A HREF="../../../../../org/apache/shiro/codec/CodecException.html" title="class in org.apache.shiro.codec">CodecException</A></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Creates a hash of the specified <code>source</code> using the given <code>salt</code> a total of
<code>hashIterations</code> times.
<p/>
By default, this class only supports Object method arguments of
type <code>byte[]</code>, <code>char[]</code>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><CODE>String</CODE></A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io"><CODE>File</CODE></A>, or
<A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io"><CODE>InputStream</CODE></A>. If either argument is anything other than these
types a <A HREF="../../../../../org/apache/shiro/codec/CodecException.html" title="class in org.apache.shiro.codec"><CODE>CodecException</CODE></A> will be thrown.
<p/>
If you want to be able to hash other object types, or use other salt types, you need to override the
<A HREF="../../../../../org/apache/shiro/codec/CodecSupport.html#toBytes(java.lang.Object)"><CODE>toBytes(Object)</CODE></A> method to support those specific types. Your other option is to
convert your arguments to one of the default three supported types first before passing them in to this
constructor}.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>source</CODE> - the source object to be hashed.<DD><CODE>salt</CODE> - the salt to use for the hash<DD><CODE>hashIterations</CODE> - the number of times the <code>source</code> argument hashed for attack resiliency.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/shiro/codec/CodecException.html" title="class in org.apache.shiro.codec">CodecException</A></CODE> - if either Object constructor argument cannot be converted into a byte array.</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getAlgorithmName()"><!-- --></A><H3>
getAlgorithmName</H3>
<PRE>
public abstract <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/shiro/crypto/hash/AbstractHash.html#line.145"><B>getAlgorithmName</B></A>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Implemented by subclasses, this specifies the <A HREF="http://java.sun.com/javase/6/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><CODE>MessageDigest</CODE></A> algorithm name
to use when performing the hash.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/shiro/crypto/hash/Hash.html#getAlgorithmName()">getAlgorithmName</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/shiro/crypto/hash/Hash.html" title="interface in org.apache.shiro.crypto.hash">Hash</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the <A HREF="http://java.sun.com/javase/6/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security"><CODE>MessageDigest</CODE></A> algorithm name to use when performing the hash.</DL>
</DD>
</DL>
<HR>
<A NAME="getBytes()"><!-- --></A><H3>
getBytes</H3>
<PRE>
public byte[] <A HREF="../../../../../src-html/org/apache/shiro/crypto/hash/AbstractHash.html#line.147"><B>getBytes</B></A>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/shiro/util/ByteSource.html#getBytes()">ByteSource</A></CODE></B></DD>
<DD>Returns the wrapped byte array.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/shiro/util/ByteSource.html#getBytes()">getBytes</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/shiro/util/ByteSource.html" title="interface in org.apache.shiro.util">ByteSource</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the wrapped byte array.</DL>
</DD>
</DL>
<HR>
<A NAME="setBytes(byte[])"><!-- --></A><H3>
setBytes</H3>
<PRE>
public void <A HREF="../../../../../src-html/org/apache/shiro/crypto/hash/AbstractHash.html#line.159"><B>setBytes</B></A>(byte[]&nbsp;alreadyHashedBytes)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Sets the raw bytes stored by this hash instance.
<p/>
The bytes are kept in raw form - they will not be hashed/changed. This is primarily a utility method for
constructing a Hash instance when the hashed value is already known.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>alreadyHashedBytes</CODE> - the raw already-hashed bytes to store in this instance.</DL>
</DD>
</DL>
<HR>
<A NAME="getDigest(java.lang.String)"><!-- --></A><H3>
getDigest</H3>
<PRE>
protected <A HREF="http://java.sun.com/javase/6/docs/api/java/security/MessageDigest.html?is-external=true" title="class or interface in java.security">MessageDigest</A> <A HREF="../../../../../src-html/org/apache/shiro/crypto/hash/AbstractHash.html#line.172"><B>getDigest</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;algorithmName)
throws <A HREF="../../../../../org/apache/shiro/crypto/UnknownAlgorithmException.html" title="class in org.apache.shiro.crypto">UnknownAlgorithmException</A></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Returns the JDK MessageDigest instance to use for executing the hash.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>algorithmName</CODE> - the algorithm to use for the hash, provided by subclasses.
<DT><B>Returns:</B><DD>the MessageDigest object for the specified <code>algorithm</code>.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/shiro/crypto/UnknownAlgorithmException.html" title="class in org.apache.shiro.crypto">UnknownAlgorithmException</A></CODE> - if the specified algorithm name is not available.</DL>
</DD>
</DL>
<HR>
<A NAME="hash(byte[])"><!-- --></A><H3>
hash</H3>
<PRE>
protected byte[] <A HREF="../../../../../src-html/org/apache/shiro/crypto/hash/AbstractHash.html#line.187"><B>hash</B></A>(byte[]&nbsp;bytes)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Hashes the specified byte array without a salt for a single iteration.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>bytes</CODE> - the bytes to hash.
<DT><B>Returns:</B><DD>the hashed bytes.</DL>
</DD>
</DL>
<HR>
<A NAME="hash(byte[], byte[])"><!-- --></A><H3>
hash</H3>
<PRE>
protected byte[] <A HREF="../../../../../src-html/org/apache/shiro/crypto/hash/AbstractHash.html#line.198"><B>hash</B></A>(byte[]&nbsp;bytes,
byte[]&nbsp;salt)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Hashes the specified byte array using the given <code>salt</code> for a single iteration.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>bytes</CODE> - the bytes to hash<DD><CODE>salt</CODE> - the salt to use for the initial hash
<DT><B>Returns:</B><DD>the hashed bytes</DL>
</DD>
</DL>
<HR>
<A NAME="hash(byte[], byte[], int)"><!-- --></A><H3>
hash</H3>
<PRE>
protected byte[] <A HREF="../../../../../src-html/org/apache/shiro/crypto/hash/AbstractHash.html#line.211"><B>hash</B></A>(byte[]&nbsp;bytes,
byte[]&nbsp;salt,
int&nbsp;hashIterations)
throws <A HREF="../../../../../org/apache/shiro/crypto/UnknownAlgorithmException.html" title="class in org.apache.shiro.crypto">UnknownAlgorithmException</A></PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Hashes the specified byte array using the given <code>salt</code> for the specified number of iterations.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>bytes</CODE> - the bytes to hash<DD><CODE>salt</CODE> - the salt to use for the initial hash<DD><CODE>hashIterations</CODE> - the number of times the the <code>bytes</code> will be hashed (for attack resiliency).
<DT><B>Returns:</B><DD>the hashed bytes.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/shiro/crypto/UnknownAlgorithmException.html" title="class in org.apache.shiro.crypto">UnknownAlgorithmException</A></CODE> - if the <A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#getAlgorithmName()"><CODE>algorithmName</CODE></A> is not available.</DL>
</DD>
</DL>
<HR>
<A NAME="toHex()"><!-- --></A><H3>
toHex</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/shiro/crypto/hash/AbstractHash.html#line.236"><B>toHex</B></A>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Returns a hex-encoded string of the underlying <A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#getBytes()"><CODE>byte array</CODE></A>.
<p/>
This implementation caches the resulting hex string so multiple calls to this method remain efficient.
However, calling <A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#setBytes(byte[])"><CODE>setBytes</CODE></A> will null the cached value, forcing it to be recalculated the
next time this method is called.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/shiro/util/ByteSource.html#toHex()">toHex</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/shiro/util/ByteSource.html" title="interface in org.apache.shiro.util">ByteSource</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a hex-encoded string of the underlying <A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#getBytes()"><CODE>byte array</CODE></A>.</DL>
</DD>
</DL>
<HR>
<A NAME="toBase64()"><!-- --></A><H3>
toBase64</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/shiro/crypto/hash/AbstractHash.html#line.252"><B>toBase64</B></A>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Returns a Base64-encoded string of the underlying <A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#getBytes()"><CODE>byte array</CODE></A>.
<p/>
This implementation caches the resulting Base64 string so multiple calls to this method remain efficient.
However, calling <A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#setBytes(byte[])"><CODE>setBytes</CODE></A> will null the cached value, forcing it to be recalculated the
next time this method is called.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/shiro/util/ByteSource.html#toBase64()">toBase64</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/shiro/util/ByteSource.html" title="interface in org.apache.shiro.util">ByteSource</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a Base64-encoded string of the underlying <A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#getBytes()"><CODE>byte array</CODE></A>.</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/shiro/crypto/hash/AbstractHash.html#line.265"><B>toString</B></A>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Simple implementation that merely returns <A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#toHex()"><CODE>toHex()</CODE></A>.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the <A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#toHex()"><CODE>toHex()</CODE></A> value.</DL>
</DD>
</DL>
<HR>
<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
equals</H3>
<PRE>
public boolean <A HREF="../../../../../src-html/org/apache/shiro/crypto/hash/AbstractHash.html#line.277"><B>equals</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;o)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Returns <code>true</code> if the specified object is a Hash and its <A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#getBytes()"><CODE>byte array</CODE></A> is identical to
this Hash's byte array, <code>false</code> otherwise.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>o</CODE> - the object (Hash) to check for equality.
<DT><B>Returns:</B><DD><code>true</code> if the specified object is a Hash and its <A HREF="../../../../../org/apache/shiro/crypto/hash/AbstractHash.html#getBytes()"><CODE>byte array</CODE></A> is identical to
this Hash's byte array, <code>false</code> otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="hashCode()"><!-- --></A><H3>
hashCode</H3>
<PRE>
public int <A HREF="../../../../../src-html/org/apache/shiro/crypto/hash/AbstractHash.html#line.290"><B>hashCode</B></A>()</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<DD>Simply returns toHex().hashCode();
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>toHex().hashCode()</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=2 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>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AbstractHash.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../org/apache/shiro/crypto/hash/ConfigurableHashService.html" title="interface in org.apache.shiro.crypto.hash"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/shiro/crypto/hash/AbstractHash.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="AbstractHash.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.apache.shiro.codec.CodecSupport">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright &#169; 2004-2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>