blob: 3919f49eb615abedce78acf621c48f72592c16d2 [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 Tue Feb 25 18:15:47 EST 2014 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
DefaultHashFormatFactory (Apache Shiro 1.2.3 API)
</TITLE>
<META NAME="date" CONTENT="2014-02-25">
<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="DefaultHashFormatFactory (Apache Shiro 1.2.3 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/DefaultHashFormatFactory.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;<A HREF="../../../../../../org/apache/shiro/crypto/hash/format/Base64Format.html" title="class in org.apache.shiro.crypto.hash.format"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DefaultHashFormatFactory.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;FIELD&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.format</FONT>
<BR>
Class DefaultHashFormatFactory</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 "><B>org.apache.shiro.crypto.hash.format.DefaultHashFormatFactory</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../../org/apache/shiro/crypto/hash/format/HashFormatFactory.html" title="interface in org.apache.shiro.crypto.hash.format">HashFormatFactory</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <A HREF="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.37"><B>DefaultHashFormatFactory</B></A><DT>extends <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><DT>implements <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/HashFormatFactory.html" title="interface in org.apache.shiro.crypto.hash.format">HashFormatFactory</A></DL>
</PRE>
<P>
This default <code>HashFormatFactory</code> implementation heuristically determines a <code>HashFormat</code> class to
instantiate based on the input argument and returns a new instance of the discovered class. The heuristics are
detailed in the <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getInstance(java.lang.String)"><CODE>getInstance</CODE></A> method documentation.
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>1.2</DD>
</DL>
<HR>
<P>
<!-- ======== 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/format/DefaultHashFormatFactory.html#DefaultHashFormatFactory()">DefaultHashFormatFactory</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#assertHashFormatImpl(java.lang.Class)">assertHashFormatImpl</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&nbsp;clazz)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<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="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getFormatClassNames()">getFormatClassNames</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>hashFormatAlias</code>-to-<code>fullyQualifiedHashFormatClassNameImplementation</code> map.</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/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getHashFormatClass(java.lang.String)">getHashFormatClass</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;token)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Heuristically determine the fully qualified HashFormat implementation class name based on the specified
token.</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/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getHashFormatClass(java.lang.String, java.lang.String)">getHashFormatClass</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;packageName,
<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;token)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Heuristically determine the fully qualified <code>HashFormat</code> implementation class name in the specified
package based on the provided token.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format">HashFormat</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getInstance(java.lang.String)">getInstance</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;in)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<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>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getSearchPackages()">getSearchPackages</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set of package names that can be searched for <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><CODE>HashFormat</CODE></A> implementations according to
heuristics defined in the <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getHashFormatClass(java.lang.String, java.lang.String)"><CODE>getHashFormat(packageName, token)</CODE></A> JavaDoc.</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/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#lookupHashFormatClass(java.lang.String)">lookupHashFormatClass</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;name)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format">HashFormat</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#newHashFormatInstance(java.lang.Class)">newHashFormatInstance</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&nbsp;clazz)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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/format/DefaultHashFormatFactory.html#setFormatClassNames(java.util.Map)">setFormatClassNames</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<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="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;&nbsp;formatClassNames)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the <code>hash-format-alias</code>-to-<code>fullyQualifiedHashFormatClassNameImplementation</code> map to be used in
the <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getInstance(java.lang.String)"><CODE>getInstance(String)</CODE></A> implementation.</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/format/DefaultHashFormatFactory.html#setSearchPackages(java.util.Set)">setSearchPackages</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<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>&gt;&nbsp;searchPackages)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a set of package names that can be searched for <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><CODE>HashFormat</CODE></A> implementations according to
heuristics defined in the <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getHashFormatClass(java.lang.String, java.lang.String)"><CODE>getHashFormat(packageName, token)</CODE></A> JavaDoc.</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#equals(java.lang.Object)" title="class or interface in java.lang">equals</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#hashCode()" title="class or interface in java.lang">hashCode</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#toString()" title="class or interface in java.lang">toString</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;
<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="DefaultHashFormatFactory()"><!-- --></A><H3>
DefaultHashFormatFactory</H3>
<PRE>
public <A HREF="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.43"><B>DefaultHashFormatFactory</B></A>()</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">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getFormatClassNames()"><!-- --></A><H3>
getFormatClassNames</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<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="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt; <A HREF="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.65"><B>getFormatClassNames</B></A>()</PRE>
<DL>
<DD>Returns a <code>hashFormatAlias</code>-to-<code>fullyQualifiedHashFormatClassNameImplementation</code> map.
<p/>
This map will be used by the <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getInstance(java.lang.String)"><CODE>getInstance</CODE></A> implementation: that method's argument
will be used as a lookup key to this map. If the map returns a value, that value will be used to instantiate
and return a new <code>HashFormat</code> instance.
<h3>Defaults</h3>
Shiro's default HashFormat implementations (as listed by the <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/ProvidedHashFormat.html" title="enum in org.apache.shiro.crypto.hash.format"><CODE>ProvidedHashFormat</CODE></A> enum) will
be searched automatically independently of this map. You only need to populate this map with custom
<code>HashFormat</code> implementations that are <em>not</em> already represented by a <code>ProvidedHashFormat</code>.
<h3>Efficiency</h3>
Populating this map will be more efficient than configuring <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getSearchPackages()"><CODE>searchPackages</CODE></A>,
but search packages may be more convenient depending on the number of <code>HashFormat</code> implementations that
need to be supported by this factory.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a <code>hashFormatAlias</code>-to-<code>fullyQualifiedHashFormatClassNameImplementation</code> map.</DL>
</DD>
</DL>
<HR>
<A NAME="setFormatClassNames(java.util.Map)"><!-- --></A><H3>
setFormatClassNames</H3>
<PRE>
public void <A HREF="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.81"><B>setFormatClassNames</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A>&lt;<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="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&gt;&nbsp;formatClassNames)</PRE>
<DL>
<DD>Sets the <code>hash-format-alias</code>-to-<code>fullyQualifiedHashFormatClassNameImplementation</code> map to be used in
the <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getInstance(java.lang.String)"><CODE>getInstance(String)</CODE></A> implementation. See the <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getFormatClassNames()"><CODE>getFormatClassNames()</CODE></A> JavaDoc for more
information.
<h3>Efficiency</h3>
Populating this map will be more efficient than configuring <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getSearchPackages()"><CODE>searchPackages</CODE></A>,
but search packages may be more convenient depending on the number of <code>HashFormat</code> implementations that
need to be supported by this factory.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>formatClassNames</CODE> - the <code>hash-format-alias</code>-to-<code>fullyQualifiedHashFormatClassNameImplementation</code>
map to be used in the <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getInstance(java.lang.String)"><CODE>getInstance(String)</CODE></A> implementation.</DL>
</DD>
</DL>
<HR>
<A NAME="getSearchPackages()"><!-- --></A><H3>
getSearchPackages</H3>
<PRE>
public <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<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>&gt; <A HREF="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.96"><B>getSearchPackages</B></A>()</PRE>
<DL>
<DD>Returns a set of package names that can be searched for <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><CODE>HashFormat</CODE></A> implementations according to
heuristics defined in the <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getHashFormatClass(java.lang.String, java.lang.String)"><CODE>getHashFormat(packageName, token)</CODE></A> JavaDoc.
<h3>Efficiency</h3>
Configuring this property is not as efficient as configuring a <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getFormatClassNames()"><CODE>formatClassNames</CODE></A>
map, but it may be more convenient depending on the number of <code>HashFormat</code> implementations that
need to be supported by this factory.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a set of package names that can be searched for <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><CODE>HashFormat</CODE></A> implementations<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getHashFormatClass(java.lang.String, java.lang.String)"><CODE>getHashFormatClass(String, String)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setSearchPackages(java.util.Set)"><!-- --></A><H3>
setSearchPackages</H3>
<PRE>
public void <A HREF="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.110"><B>setSearchPackages</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A>&lt;<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>&gt;&nbsp;searchPackages)</PRE>
<DL>
<DD>Sets a set of package names that can be searched for <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><CODE>HashFormat</CODE></A> implementations according to
heuristics defined in the <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getHashFormatClass(java.lang.String, java.lang.String)"><CODE>getHashFormat(packageName, token)</CODE></A> JavaDoc.
<h3>Efficiency</h3>
Configuring this property is not as efficient as configuring a <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getFormatClassNames()"><CODE>formatClassNames</CODE></A>
map, but it may be more convenient depending on the number of <code>HashFormat</code> implementations that
need to be supported by this factory.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>searchPackages</CODE> - a set of package names that can be searched for <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><CODE>HashFormat</CODE></A> implementations</DL>
</DD>
</DL>
<HR>
<A NAME="getInstance(java.lang.String)"><!-- --></A><H3>
getInstance</H3>
<PRE>
public <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format">HashFormat</A> <A HREF="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.114"><B>getInstance</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;in)</PRE>
<DL>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/shiro/crypto/hash/format/HashFormatFactory.html#getInstance(java.lang.String)">getInstance</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/shiro/crypto/hash/format/HashFormatFactory.html" title="interface in org.apache.shiro.crypto.hash.format">HashFormatFactory</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getHashFormatClass(java.lang.String)"><!-- --></A><H3>
getHashFormatClass</H3>
<PRE>
protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A> <A HREF="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.182"><B>getHashFormatClass</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;token)</PRE>
<DL>
<DD>Heuristically determine the fully qualified HashFormat implementation class name based on the specified
token.
<p/>
This implementation functions as follows (in order):
<ol>
<li>See if the argument can be used as a lookup key in the <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getFormatClassNames()"><CODE>formatClassNames</CODE></A>
map. If a value (a fully qualified class name <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><CODE>HashFormat</CODE></A> implementation) is found,
<A HREF="../../../../../../org/apache/shiro/util/ClassUtils.html#forName(java.lang.String)"><CODE>lookup</CODE></A> the class and return it.</li>
<li>
Check to see if the token argument is a
<A HREF="../../../../../../org/apache/shiro/crypto/hash/format/ProvidedHashFormat.html" title="enum in org.apache.shiro.crypto.hash.format"><CODE>ProvidedHashFormat</CODE></A> enum value. If so, acquire the corresponding <code>HashFormat</code> class and
return it.
</li>
<li>
Check to see if the token argument is itself a fully qualified class name. If so, try to load the class
and return it.
</li>
<li>If the above options do not result in a discovered class, search all all configured
<A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getSearchPackages()"><CODE>searchPackages</CODE></A> using heuristics defined in the
<A HREF="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getHashFormatClass(java.lang.String, java.lang.String)"><CODE>getHashFormatClass(packageName, token)</CODE></A> method documentation
(relaying the <code>token</code> argument to that method for each configured package).
</li>
</ol>
<p/>
If a class is not discovered via any of the above means, <code>null</code> is returned to indicate the class
could not be found.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>token</CODE> - the string token from which a class name will be heuristically determined.
<DT><B>Returns:</B><DD>the discovered HashFormat class implementation or <code>null</code> if no class could be heuristically determined.</DL>
</DD>
</DL>
<HR>
<A NAME="getHashFormatClass(java.lang.String, java.lang.String)"><!-- --></A><H3>
getHashFormatClass</H3>
<PRE>
protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A> <A HREF="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.281"><B>getHashFormatClass</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;packageName,
<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;token)</PRE>
<DL>
<DD>Heuristically determine the fully qualified <code>HashFormat</code> implementation class name in the specified
package based on the provided token.
<p/>
The token is expected to be a relevant fragment of an unqualified class name in the specified package.
A 'relevant fragment' can be one of the following:
<ul>
<li>The <code>HashFormat</code> implementation unqualified class name</li>
<li>The prefix of an unqualified class name ending with the text <code>Format</code>. The first character of
this prefix can be upper or lower case and both options will be tried.</li>
<li>The prefix of an unqualified class name ending with the text <code>HashFormat</code>. The first character of
this prefix can be upper or lower case and both options will be tried.</li>
<li>The prefix of an unqualified class name ending with the text <code>CryptoFormat</code>. The first character
of this prefix can be upper or lower case and both options will be tried.</li>
</ul>
<p/>
Some examples:
<table>
<tr>
<th>Package Name</th>
<th>Token</th>
<th>Expected Output Class</th>
<th>Notes</th>
</tr>
<tr>
<td><code>com.foo.whatever</code></td>
<td><code>MyBarFormat</code></td>
<td><code>com.foo.whatever.MyBarFormat</code></td>
<td>Token is a complete unqualified class name</td>
</tr>
<tr>
<td><code>com.foo.whatever</code></td>
<td><code>Bar</code></td>
<td><code>com.foo.whatever.BarFormat</code> <em>or</em> <code>com.foo.whatever.BarHashFormat</code> <em>or</em>
<code>com.foo.whatever.BarCryptFormat</code></td>
<td>The token is only part of the unqualified class name - i.e. all characters in front of the <code>*Format</code>
<code>*HashFormat</code> or <code>*CryptFormat</code> suffix. Note that the <code>*Format</code> variant will be tried before
<code>*HashFormat</code> and then finally <code>*CryptFormat</code></td>
</tr>
<tr>
<td><code>com.foo.whatever</code></td>
<td><code>bar</code></td>
<td><code>com.foo.whatever.BarFormat</code> <em>or</em> <code>com.foo.whatever.BarHashFormat</code> <em>or</em>
<code>com.foo.whatever.BarCryptFormat</code></td>
<td>Exact same output as the above <code>Bar</code> input example. (The token differs only by the first character)</td>
</tr>
</table>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>packageName</CODE> - the package to search for matching <code>HashFormat</code> implementations.<DD><CODE>token</CODE> - the string token from which a class name will be heuristically determined.
<DT><B>Returns:</B><DD>the discovered HashFormat class implementation or <code>null</code> if no class could be heuristically determined.</DL>
</DD>
</DL>
<HR>
<A NAME="lookupHashFormatClass(java.lang.String)"><!-- --></A><H3>
lookupHashFormatClass</H3>
<PRE>
protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A> <A HREF="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.333"><B>lookupHashFormatClass</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;name)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="assertHashFormatImpl(java.lang.Class)"><!-- --></A><H3>
assertHashFormatImpl</H3>
<PRE>
protected final void <A HREF="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.342"><B>assertHashFormatImpl</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&nbsp;clazz)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="newHashFormatInstance(java.lang.Class)"><!-- --></A><H3>
newHashFormatInstance</H3>
<PRE>
protected final <A HREF="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format">HashFormat</A> <A HREF="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.350"><B>newHashFormatInstance</B></A>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&nbsp;clazz)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</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/DefaultHashFormatFactory.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;<A HREF="../../../../../../org/apache/shiro/crypto/hash/format/Base64Format.html" title="class in org.apache.shiro.crypto.hash.format"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="DefaultHashFormatFactory.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;FIELD&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-2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>