You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by ru...@apache.org on 2006/09/24 18:00:50 UTC
svn commit: r449418 -
/webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java
Author: ruchithf
Date: Sun Sep 24 09:00:50 2006
New Revision: 449418
URL: http://svn.apache.org/viewvc?view=rev&rev=449418
Log:
Adding another constructor to create a crypto impl with a given classloader
Modified:
webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java?view=diff&rev=449418&r1=449417&r2=449418
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java Sun Sep 24 09:00:50 2006
@@ -71,6 +71,26 @@
String cryptoClassName = properties.getProperty("org.apache.ws.security.crypto.provider");
return loadClass(cryptoClassName, properties);
}
+
+ /**
+ * getInstance
+ * <p/>
+ * Returns an instance of Crypto loaded with the given classloader.
+ * The properties are handed over the the crypto implementation.
+ * The porperties must at least contain the Crypto implementation
+ * class name as the value of the property : org.apache.ws.security.crypto.provider
+ * <p/>
+ *
+ * @param properties The Properties that are forwarded to the crypto implementaion
+ * and the Crypto impl class name.
+ * These properties are dependend on the crypto implementatin
+ * @param classLoader The class loader to use
+ * @return The cyrpto implementation or null if no cryptoClassName was defined
+ */
+ public static Crypto getInstance(Properties properties, ClassLoader classLoader) {
+ String cryptoClassName = properties.getProperty("org.apache.ws.security.crypto.provider");
+ return loadClass(cryptoClassName, properties, classLoader);
+ }
/**
* getInstance
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org