code cleanup

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/Common/common-encryption@68960 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Roberto Cirillo 2013-02-07 11:17:17 +00:00
parent 7f5f52b173
commit 5832d408d0
3 changed files with 0 additions and 35 deletions

View File

@ -10,13 +10,6 @@ import javax.crypto.SecretKey;
*/
public class KeyFactory {
// static org.apache.commons.logging.Log log =
// org.apache.commons.logging.LogFactory.getLog(
// KeyFactory.class.getName());
//
// static {
// org.apache.xml.security.Init.init();
// }
/**
* Generates an AES key
*/

View File

@ -9,8 +9,6 @@ import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESedeKeySpec;
//import org.apache.xml.security.utils.JavaUtils;
/**
* Manage keys serialization

View File

@ -19,11 +19,8 @@ import org.gcube.common.scope.impl.ScopeBean.Type;
final class SymmetricKey {
private static Key key;
private static String localKey = "/symm.key";
private static String keyAlgorithm = "AES";
//private constructor
private SymmetricKey() {}
@ -73,29 +70,6 @@ final class SymmetricKey {
return rawKey;
}
// protected static String getLocalKey() throws InvalidKeyException{
// String scopeReference=null;
// //file that contains the key
// String keyFile=null;
// String scope=ScopeProvider.instance.get();
// System.out.println("scope founded "+scope);
// if((scope !=null) && (scope.contains("/"))){
// String[] vos=scope.split("/");
// // if the scope is a VO or VRE scope
// if((vos != null) && (vos.length > 2)){
// scopeReference=vos[2];
// // if the scope is a infrastructure scope
// }else if((vos != null) && (vos.length == 2)){
// scopeReference=vos[1];
// }else{
// throw new InvalidKeyException(" invalid key for scope: "+scope);
// }
// keyFile=scopeReference+".gcubekey";
// }else{
// throw new InvalidKeyException(" invalid key for scope: "+scope);
// }
// return keyFile;
// }
protected static String getKeyFileName() throws InvalidKeyException{
String keyFile=null;