PicketLink Federation Core 2.1.6.Final-redhat-2

org.picketlink.identity.federation.core.util
Class PBEUtils

java.lang.Object
  extended by 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

Constructor Summary
PBEUtils()
           
 
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
 

Constructor Detail

PBEUtils

public PBEUtils()
Method Detail

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

PicketLink Federation Core 2.1.6.Final-redhat-2

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.