575 lines
26 KiB
HTML

<!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_33) on Fri Aug 22 06:48:06 CEST 2014 -->
<TITLE>
PBKDF2Engine
</TITLE>
<META NAME="date" CONTENT="2014-08-22">
<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="PBKDF2Engine";
}
}
</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/PBKDF2Engine.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-files/index-1.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="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html" title="interface in fr.xephi.authme.security.pbkdf2"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Formatter.html" title="interface in fr.xephi.authme.security.pbkdf2"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?fr/xephi/authme/security/pbkdf2/PBKDF2Engine.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="PBKDF2Engine.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">
fr.xephi.authme.security.pbkdf2</FONT>
<BR>
Class PBKDF2Engine</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>fr.xephi.authme.security.pbkdf2.PBKDF2Engine</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html" title="interface in fr.xephi.authme.security.pbkdf2">PBKDF2</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>PBKDF2Engine</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html" title="interface in fr.xephi.authme.security.pbkdf2">PBKDF2</A></DL>
</PRE>
<P>
<p>
Request for Comments: 2898 PKCS #5: Password-Based Cryptography Specification
<p>
Version 2.0
<p>
PBKDF2 (P, S, c, dkLen)
<p>
Options:
<ul>
<li>PRF underlying pseudorandom function (hLen denotes the length in octets
of the pseudorandom function output). PRF is pluggable.</li>
</ul>
<p>
Input:
<ul>
<li>P password, an octet string</li>
<li>S salt, an octet string</li>
<li>c iteration count, a positive integer</li>
<li>dkLen intended length in octets of the derived key, a positive integer,
at most (2^32 - 1) * hLen</li>
</ul>
<p>
Output:
<ul>
<li>DK derived key, a dkLen-octet string</li>
</ul>
<hr />
<p>
A free Java implementation of Password Based Key Derivation Function 2 as
defined by RFC 2898. Copyright (c) 2007 Matthias G&auml;rtner
</p>
<p>
This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 2.1 of the License, or (at your option)
any later version.
</p>
<p>
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
</p>
<p>
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
</p>
<p>
For Details, see <a
href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
>http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html</a>.
</p>
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>1.0</DD>
<DT><B>Author:</B></DT>
<DD>Matthias G&auml;rtner</DD>
<DT><B>See Also:</B><DD><a href="http://tools.ietf.org/html/rfc2898">RFC 2898</a></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="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Engine.html#PBKDF2Engine()">PBKDF2Engine</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor for PBKDF2 implementation object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Engine.html#PBKDF2Engine(fr.xephi.authme.security.pbkdf2.PBKDF2Parameters)">PBKDF2Engine</A></B>(<A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Parameters.html" title="class in fr.xephi.authme.security.pbkdf2">PBKDF2Parameters</A>&nbsp;parameters)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor for PBKDF2 implementation object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Engine.html#PBKDF2Engine(fr.xephi.authme.security.pbkdf2.PBKDF2Parameters, fr.xephi.authme.security.pbkdf2.PRF)">PBKDF2Engine</A></B>(<A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Parameters.html" title="class in fr.xephi.authme.security.pbkdf2">PBKDF2Parameters</A>&nbsp;parameters,
<A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PRF.html" title="interface in fr.xephi.authme.security.pbkdf2">PRF</A>&nbsp;prf)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor for PBKDF2 implementation object.</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;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Engine.html#deriveKey(java.lang.String)">deriveKey</A></B>(java.lang.String&nbsp;inputPassword)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert String-based input to internal byte array, then invoke PBKDF2.</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="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Engine.html#deriveKey(java.lang.String, int)">deriveKey</A></B>(java.lang.String&nbsp;inputPassword,
int&nbsp;dkLen)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert String-based input to internal byte array, then invoke PBKDF2.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Parameters.html" title="class in fr.xephi.authme.security.pbkdf2">PBKDF2Parameters</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Engine.html#getParameters()">getParameters</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Allow reading of configured parameters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PRF.html" title="interface in fr.xephi.authme.security.pbkdf2">PRF</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Engine.html#getPseudoRandomFunction()">getPseudoRandomFunction</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get currently set Pseudo Random Function.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Engine.html#main(java.lang.String[])">main</A></B>(java.lang.String[]&nbsp;args)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenience client function.</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="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Engine.html#setParameters(fr.xephi.authme.security.pbkdf2.PBKDF2Parameters)">setParameters</A></B>(<A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Parameters.html" title="class in fr.xephi.authme.security.pbkdf2">PBKDF2Parameters</A>&nbsp;parameters)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Allow setting of configured parameters.</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="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Engine.html#setPseudoRandomFunction(fr.xephi.authme.security.pbkdf2.PRF)">setPseudoRandomFunction</A></B>(<A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PRF.html" title="interface in fr.xephi.authme.security.pbkdf2">PRF</A>&nbsp;prf)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the Pseudo Random Function to use.</TD>
</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="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Engine.html#verifyKey(java.lang.String)">verifyKey</A></B>(java.lang.String&nbsp;inputPassword)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert String-based input to internal byte arrays, then invoke PBKDF2
and verify result against the reference data that is supplied in the
PBKDF2Parameters.</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.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</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="PBKDF2Engine()"><!-- --></A><H3>
PBKDF2Engine</H3>
<PRE>
public <B>PBKDF2Engine</B>()</PRE>
<DL>
<DD>Constructor for PBKDF2 implementation object. PBKDF2 parameters must be
passed later.
<P>
</DL>
<HR>
<A NAME="PBKDF2Engine(fr.xephi.authme.security.pbkdf2.PBKDF2Parameters)"><!-- --></A><H3>
PBKDF2Engine</H3>
<PRE>
public <B>PBKDF2Engine</B>(<A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Parameters.html" title="class in fr.xephi.authme.security.pbkdf2">PBKDF2Parameters</A>&nbsp;parameters)</PRE>
<DL>
<DD>Constructor for PBKDF2 implementation object. PBKDF2 parameters are
passed so that this implementation knows iteration count, method to use
and String encoding.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>parameters</CODE> - Data holder for iteration count, method to use et cetera.</DL>
</DL>
<HR>
<A NAME="PBKDF2Engine(fr.xephi.authme.security.pbkdf2.PBKDF2Parameters, fr.xephi.authme.security.pbkdf2.PRF)"><!-- --></A><H3>
PBKDF2Engine</H3>
<PRE>
public <B>PBKDF2Engine</B>(<A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Parameters.html" title="class in fr.xephi.authme.security.pbkdf2">PBKDF2Parameters</A>&nbsp;parameters,
<A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PRF.html" title="interface in fr.xephi.authme.security.pbkdf2">PRF</A>&nbsp;prf)</PRE>
<DL>
<DD>Constructor for PBKDF2 implementation object. PBKDF2 parameters are
passed so that this implementation knows iteration count, method to use
and String encoding.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>parameters</CODE> - Data holder for iteration count, method to use et cetera.<DD><CODE>prf</CODE> - Supply customer Pseudo Random Function.</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="deriveKey(java.lang.String)"><!-- --></A><H3>
deriveKey</H3>
<PRE>
public byte[] <B>deriveKey</B>(java.lang.String&nbsp;inputPassword)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html#deriveKey(java.lang.String)">PBKDF2</A></CODE></B></DD>
<DD>Convert String-based input to internal byte array, then invoke PBKDF2.
Desired key length defaults to Pseudo Random Function block size.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html#deriveKey(java.lang.String)">deriveKey</A></CODE> in interface <CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html" title="interface in fr.xephi.authme.security.pbkdf2">PBKDF2</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>inputPassword</CODE> - Candidate password to compute the derived key for.
<DT><B>Returns:</B><DD>internal byte array</DL>
</DD>
</DL>
<HR>
<A NAME="deriveKey(java.lang.String, int)"><!-- --></A><H3>
deriveKey</H3>
<PRE>
public byte[] <B>deriveKey</B>(java.lang.String&nbsp;inputPassword,
int&nbsp;dkLen)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html#deriveKey(java.lang.String, int)">PBKDF2</A></CODE></B></DD>
<DD>Convert String-based input to internal byte array, then invoke PBKDF2.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html#deriveKey(java.lang.String, int)">deriveKey</A></CODE> in interface <CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html" title="interface in fr.xephi.authme.security.pbkdf2">PBKDF2</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>inputPassword</CODE> - Candidate password to compute the derived key for.<DD><CODE>dkLen</CODE> - Specify desired key length
<DT><B>Returns:</B><DD>internal byte array</DL>
</DD>
</DL>
<HR>
<A NAME="verifyKey(java.lang.String)"><!-- --></A><H3>
verifyKey</H3>
<PRE>
public boolean <B>verifyKey</B>(java.lang.String&nbsp;inputPassword)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html#verifyKey(java.lang.String)">PBKDF2</A></CODE></B></DD>
<DD>Convert String-based input to internal byte arrays, then invoke PBKDF2
and verify result against the reference data that is supplied in the
PBKDF2Parameters.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html#verifyKey(java.lang.String)">verifyKey</A></CODE> in interface <CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html" title="interface in fr.xephi.authme.security.pbkdf2">PBKDF2</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>inputPassword</CODE> - Candidate password to compute the derived key for.
<DT><B>Returns:</B><DD><code>true</code> password match; <code>false</code> incorrect
password</DL>
</DD>
</DL>
<HR>
<A NAME="getPseudoRandomFunction()"><!-- --></A><H3>
getPseudoRandomFunction</H3>
<PRE>
public <A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PRF.html" title="interface in fr.xephi.authme.security.pbkdf2">PRF</A> <B>getPseudoRandomFunction</B>()</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html#getPseudoRandomFunction()">PBKDF2</A></CODE></B></DD>
<DD>Get currently set Pseudo Random Function.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html#getPseudoRandomFunction()">getPseudoRandomFunction</A></CODE> in interface <CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html" title="interface in fr.xephi.authme.security.pbkdf2">PBKDF2</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>Currently set Pseudo Random Function</DL>
</DD>
</DL>
<HR>
<A NAME="getParameters()"><!-- --></A><H3>
getParameters</H3>
<PRE>
public <A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Parameters.html" title="class in fr.xephi.authme.security.pbkdf2">PBKDF2Parameters</A> <B>getParameters</B>()</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html#getParameters()">PBKDF2</A></CODE></B></DD>
<DD>Allow reading of configured parameters.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html#getParameters()">getParameters</A></CODE> in interface <CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html" title="interface in fr.xephi.authme.security.pbkdf2">PBKDF2</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>Currently set parameters.</DL>
</DD>
</DL>
<HR>
<A NAME="setParameters(fr.xephi.authme.security.pbkdf2.PBKDF2Parameters)"><!-- --></A><H3>
setParameters</H3>
<PRE>
public void <B>setParameters</B>(<A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Parameters.html" title="class in fr.xephi.authme.security.pbkdf2">PBKDF2Parameters</A>&nbsp;parameters)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html#setParameters(fr.xephi.authme.security.pbkdf2.PBKDF2Parameters)">PBKDF2</A></CODE></B></DD>
<DD>Allow setting of configured parameters.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html#setParameters(fr.xephi.authme.security.pbkdf2.PBKDF2Parameters)">setParameters</A></CODE> in interface <CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html" title="interface in fr.xephi.authme.security.pbkdf2">PBKDF2</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setPseudoRandomFunction(fr.xephi.authme.security.pbkdf2.PRF)"><!-- --></A><H3>
setPseudoRandomFunction</H3>
<PRE>
public void <B>setPseudoRandomFunction</B>(<A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PRF.html" title="interface in fr.xephi.authme.security.pbkdf2">PRF</A>&nbsp;prf)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html#setPseudoRandomFunction(fr.xephi.authme.security.pbkdf2.PRF)">PBKDF2</A></CODE></B></DD>
<DD>Set the Pseudo Random Function to use. Note that deriveKeys/getPRF does
init this object using the supplied candidate password. If this is
undesired, one has to override getPRF.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html#setPseudoRandomFunction(fr.xephi.authme.security.pbkdf2.PRF)">setPseudoRandomFunction</A></CODE> in interface <CODE><A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html" title="interface in fr.xephi.authme.security.pbkdf2">PBKDF2</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>prf</CODE> - Pseudo Random Function to set.</DL>
</DD>
</DL>
<HR>
<A NAME="main(java.lang.String[])"><!-- --></A><H3>
main</H3>
<PRE>
public static void <B>main</B>(java.lang.String[]&nbsp;args)
throws java.io.IOException,
java.security.NoSuchAlgorithmException</PRE>
<DL>
<DD>Convenience client function. Convert supplied password with random 8-byte
salt and 1000 iterations using HMacSHA1. Assume that password is in
ISO-8559-1 encoding. Output result as
&quot;Salt:iteration-count:PBKDF2&quot; with binary data in hexadecimal
encoding.
Example: Password &quot;password&quot; (without the quotes) leads to
48290A0B96C426C3:1000:973899B1D4AFEB3ED371060D0797E0EE0142BD04
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>args</CODE> - Supply the password as argument.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE>
<DD><CODE>java.security.NoSuchAlgorithmException</CODE></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/PBKDF2Engine.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-files/index-1.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="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2.html" title="interface in fr.xephi.authme.security.pbkdf2"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../fr/xephi/authme/security/pbkdf2/PBKDF2Formatter.html" title="interface in fr.xephi.authme.security.pbkdf2"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?fr/xephi/authme/security/pbkdf2/PBKDF2Engine.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="PBKDF2Engine.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>
</BODY>
</HTML>