org.picketlink.identity.federation.core.util
Class PBEUtils
java.lang.Object
org.picketlink.identity.federation.core.util.PBEUtils
public class PBEUtils
- extends Object
Utility dealing with Password Based Encryption (Code is ripped off of the PBEUtils class in JBossSecurity/PicketBox)
- Since:
- May 25, 2010
- Author:
- Scott.Stark@jboss.org, Anil.Saldhana@redhat.com
Method Summary |
static byte[] |
decode(byte[] secret,
String cipherAlgorithm,
SecretKey cipherKey,
PBEParameterSpec cipherSpec)
|
static String |
decode64(String secret,
String cipherAlgorithm,
SecretKey cipherKey,
PBEParameterSpec cipherSpec)
|
static byte[] |
encode(byte[] secret,
String cipherAlgorithm,
SecretKey cipherKey,
PBEParameterSpec cipherSpec)
|
static String |
encode64(byte[] secret,
String cipherAlgorithm,
SecretKey cipherKey,
PBEParameterSpec cipherSpec)
|
static void |
main(String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PBEUtils
public PBEUtils()
encode
public static byte[] encode(byte[] secret,
String cipherAlgorithm,
SecretKey cipherKey,
PBEParameterSpec cipherSpec)
throws Exception
- Throws:
Exception
encode64
public static String encode64(byte[] secret,
String cipherAlgorithm,
SecretKey cipherKey,
PBEParameterSpec cipherSpec)
throws Exception
- Throws:
Exception
decode
public static byte[] decode(byte[] secret,
String cipherAlgorithm,
SecretKey cipherKey,
PBEParameterSpec cipherSpec)
throws GeneralSecurityException
- Throws:
GeneralSecurityException
decode64
public static String decode64(String secret,
String cipherAlgorithm,
SecretKey cipherKey,
PBEParameterSpec cipherSpec)
throws GeneralSecurityException,
UnsupportedEncodingException
- Throws:
GeneralSecurityException
UnsupportedEncodingException
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.