org.gcube.common.utils.encryption
Class KeySerialization

java.lang.Object
  extended by org.gcube.common.utils.encryption.KeySerialization

public class KeySerialization
extends Object

Manage keys serialization

Author:
Manuele Simi (CNR)

Constructor Summary
KeySerialization()
           
 
Method Summary
protected static SecretKey loadDESede(File file, String jceAlgorithmName)
          Loads the key
protected static void store(Key key, File file)
          Stores the key
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeySerialization

public KeySerialization()
Method Detail

store

protected static void store(Key key,
                            File file)
                     throws Exception
Stores the key

Parameters:
key - the key to store
file - the file where to store the key
Throws:
Exception

loadDESede

protected static SecretKey loadDESede(File file,
                                      String jceAlgorithmName)
                               throws Exception
Loads the key

Parameters:
file - the name of the file where the key has been stored
jceAlgorithmName - the name of the algorithm of the key
Throws:
Exception


Copyright © 2014. All Rights Reserved.