org.jboss.security.plugins
Class PBEUtils

java.lang.Object
  extended byorg.jboss.security.plugins.PBEUtils

public class PBEUtils
extends java.lang.Object

Ecrypt a password using the JaasSecurityDomain password Usage: PBEUtils salt count domain-password password salt : the Salt attribute from the JaasSecurityDomain count : the IterationCount attribute from the JaasSecurityDomain domain-password : the plaintext password that maps to the KeyStorePass attribute from the JaasSecurityDomain password : the plaintext password that should be encrypted with the JaasSecurityDomain password


Constructor Summary
PBEUtils()
           
 
Method Summary
static byte[] decode(byte[] secret, java.lang.String cipherAlgorithm, javax.crypto.SecretKey cipherKey, javax.crypto.spec.PBEParameterSpec cipherSpec)
           
static java.lang.String decode64(java.lang.String secret, java.lang.String cipherAlgorithm, javax.crypto.SecretKey cipherKey, javax.crypto.spec.PBEParameterSpec cipherSpec)
           
static byte[] encode(byte[] secret, java.lang.String cipherAlgorithm, javax.crypto.SecretKey cipherKey, javax.crypto.spec.PBEParameterSpec cipherSpec)
           
static java.lang.String encode64(byte[] secret, java.lang.String cipherAlgorithm, javax.crypto.SecretKey cipherKey, javax.crypto.spec.PBEParameterSpec cipherSpec)
           
static void main(java.lang.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,
                            java.lang.String cipherAlgorithm,
                            javax.crypto.SecretKey cipherKey,
                            javax.crypto.spec.PBEParameterSpec cipherSpec)
                     throws java.lang.Exception
Throws:
java.lang.Exception

encode64

public static java.lang.String encode64(byte[] secret,
                                        java.lang.String cipherAlgorithm,
                                        javax.crypto.SecretKey cipherKey,
                                        javax.crypto.spec.PBEParameterSpec cipherSpec)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

decode

public static byte[] decode(byte[] secret,
                            java.lang.String cipherAlgorithm,
                            javax.crypto.SecretKey cipherKey,
                            javax.crypto.spec.PBEParameterSpec cipherSpec)
                     throws java.lang.Exception
Throws:
java.lang.Exception

decode64

public static java.lang.String decode64(java.lang.String secret,
                                        java.lang.String cipherAlgorithm,
                                        javax.crypto.SecretKey cipherKey,
                                        javax.crypto.spec.PBEParameterSpec cipherSpec)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception