| java.lang.Object com.sun.xml.wss.impl.misc.SecurityUtil
SecurityUtil | public class SecurityUtil (Code) | | Utility class for the Encryption and Signature related methods
author: Ashutosh Shahi |
Field Summary | |
final protected static Logger | log |
Method Summary | |
public static byte[] | P_SHA1(byte[] secret, byte[] seed) | public static byte[] | P_SHA1(byte[] secret, byte[] seed, int requiredSize) | public static void | checkIncludeTokenPolicy(FilterProcessingContext context, AuthenticationTokenPolicy.X509CertificateBinding certInfo, String x509id) | public static void | checkIncludeTokenPolicyOpt(JAXBFilterProcessingContext context, AuthenticationTokenPolicy.X509CertificateBinding certInfo, String x509id) | public static Element | convertSTRToElement(Object strElem, Document doc) | public static void | copySubject(Subject to, Subject from) | public static SecretKey | generateSymmetricKey(String algorithm) | public static String | generateUUID() | public static String | getDataEncryptionAlgo(JAXBFilterProcessingContext context) | public static int | getLengthFromAlgorithm(String algorithm) | public static String | getSecretKeyAlgorithm(String encryptionAlgo) | public static Subject | getSubject(Map context) | public static String | getWsuIdOrId(Element elem) | public static void | initInferredIssuedTokenContext(FilterProcessingContext wssContext, Token str, Key returnKey) | public static void | insertCertificate(FilterProcessingContext context, AuthenticationTokenPolicy.X509CertificateBinding certInfo, String x509id) | public static boolean | isBinarySecret(SOAPElement elem) | public static boolean | isEncryptedKey(SOAPElement elem) | public static URL | loadFromClasspath(String configFileName) Returns a URL pointing to the given config file. | public static URL | loadFromContext(String configFileName, Object context) Returns a URL pointing to the given config file. | public static SecurityContextTokenImpl | locateBySCTId(FilterProcessingContext context, String sctId) | public static void | resolveIssuedToken(FilterProcessingContext context, IssuedTokenKeyBinding itkb) | public static void | resolveSCT(FilterProcessingContext context, SecureConversationTokenKeyBinding sctBinding) | public static void | updateSamlVsKeyCache(SecurityTokenReference str, FilterProcessingContext ctx, Key symKey) | public static void | updateSamlVsKeyCache(SecurityTokenReferenceType str, FilterProcessingContext ctx, Key symKey) |
SecurityUtil | public SecurityUtil()(Code) | | Creates a new instance of SecurityUtil
|
P_SHA1 | public static byte[] P_SHA1(byte[] secret, byte[] seed) throws Exception(Code) | | |
getLengthFromAlgorithm | public static int getLengthFromAlgorithm(String algorithm) throws XWSSecurityException(Code) | | Lookup method to get the Key Length based on algorithm
TODO: Not complete yet, need to add more algorithms
NOTE: This method should only be used for DerivedKeyTokenLengths
|
getSecretKeyAlgorithm | public static String getSecretKeyAlgorithm(String encryptionAlgo)(Code) | | |
loadFromClasspath | public static URL loadFromClasspath(String configFileName)(Code) | | Returns a URL pointing to the given config file. The file is looked up as
a resource on the classpath.
May return null if the file can not be found.
Parameters: configFileName - the name of the file resource. May not be null . |
loadFromContext | public static URL loadFromContext(String configFileName, Object context)(Code) | | Returns a URL pointing to the given config file. The file name is
looked up as a resource from a ServletContext.
May return null if the file can not be found.
Parameters: configFileName - The name of the file resource Parameters: context - A ServletContext object. May not be null. |
|
|