org.apache.wss4j.common.util
Class KeyUtils

java.lang.Object
  extended by org.apache.wss4j.common.util.KeyUtils

public final class KeyUtils
extends Object


Constructor Summary
KeyUtils()
           
 
Method Summary
static int getKeyLength(String algorithm)
          Returns the length of the key in # of bytes
static SecretKey prepareSecretKey(String symEncAlgo, byte[] rawKey)
          Convert the raw key bytes into a SecretKey object of type symEncAlgo.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyUtils

public KeyUtils()
Method Detail

getKeyLength

public static int getKeyLength(String algorithm)
                        throws WSSecurityException
Returns the length of the key in # of bytes

Parameters:
algorithm -
Returns:
the key length
Throws:
WSSecurityException

prepareSecretKey

public static SecretKey prepareSecretKey(String symEncAlgo,
                                         byte[] rawKey)
Convert the raw key bytes into a SecretKey object of type symEncAlgo.



Copyright © 2004–2015 The Apache Software Foundation. All rights reserved.