org.apache.jetspeed.security.util
Class PBEPasswordTool
java.lang.Object
org.apache.jetspeed.security.util.PBEPasswordTool
- Direct Known Subclasses:
- PBEPasswordService
public class PBEPasswordTool
- extends Object
PBEPasswordTool encodes and decodes user passwords using Password Based encryptionl
- Version:
- $Id$
- Author:
- Ate Douma
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CIPHER_ALGORITM
private static final String CIPHER_ALGORITM
- See Also:
- Constant Field Values
PKCS_5_ITERATIONCOUNT
private static final int PKCS_5_ITERATIONCOUNT
- See Also:
- Constant Field Values
PKCS_5_BASE_SALT
private static final byte[] PKCS_5_BASE_SALT
pbeKey
private SecretKey pbeKey
PBEPasswordTool
public PBEPasswordTool(String pbePassword)
throws InvalidKeySpecException,
NoSuchAlgorithmException
- Throws:
InvalidKeySpecException
NoSuchAlgorithmException
encode
public String encode(String userName,
String clearTextPassword)
throws org.apache.jetspeed.security.SecurityException
- Throws:
org.apache.jetspeed.security.SecurityException
decode
public String decode(String userName,
String encodedPassword)
throws org.apache.jetspeed.security.SecurityException
- Throws:
org.apache.jetspeed.security.SecurityException
createSalt
private byte[] createSalt(byte[] secret)
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.