| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.seam.security.crypto.MacBasedPRF
public class MacBasedPRF
Copied from Matthias Gartner's PKCS#5 implementation - see http://rtner.de/software/PBKDF2.html Default PRF implementation based on standard javax.crypt.Mac mechanisms.
A free Java implementation of Password Based Key Derivation Function 2 as defined by RFC 2898. Copyright (c) 2007 Matthias Gärtner
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.
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.
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
For Details, see http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
| Field Summary | |
|---|---|
| protected  int | hLen | 
| protected  Mac | mac | 
| protected  String | macAlgorithm | 
| Constructor Summary | |
|---|---|
| MacBasedPRF(String macAlgorithm)Create Mac-based Pseudo Random Function. | |
| MacBasedPRF(String macAlgorithm,
            String provider) | |
| Method Summary | |
|---|---|
|  byte[] | doFinal(byte[] M)Pseudo Random Function | 
|  int | getHLen()Query block size of underlying algorithm/mechanism. | 
|  void | init(byte[] P)Initialize this instance with the user-supplied password. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected Mac mac
protected int hLen
protected String macAlgorithm
| Constructor Detail | 
|---|
public MacBasedPRF(String macAlgorithm)
macAlgorithm - Mac algorithm to use, i.e. HMacSHA1 or HMacMD5.
public MacBasedPRF(String macAlgorithm,
                   String provider)
| Method Detail | 
|---|
public byte[] doFinal(byte[] M)
PRF
doFinal in interface PRFM - Input data/message etc. Together with any data supplied during
           initilization.
public int getHLen()
PRF
getHLen in interface PRFpublic void init(byte[] P)
PRF
init in interface PRFP - The password supplied as array of bytes. It is the caller's task
           to convert String passwords to bytes as appropriate.| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||