Class KeySerialization

java.lang.Object
org.gcube.common.encryption.KeySerialization

public class KeySerialization extends Object
Manage keys serialization
Author:
Manuele Simi (CNR), Roberto Cirillo (ISTI - CNR), Luca Frosini (ISTI - CNR)
  • Constructor Details

    • KeySerialization

      public KeySerialization()
  • Method Details

    • store

      public 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 - if storing the key fails
    • loadDESede

      protected static SecretKey loadDESede(File file, String jceAlgorithmName) throws Exception
      Loads the DESede key
      Parameters:
      file - the name of the file where the key has been stored
      jceAlgorithmName - the name of the algorithm of the key
      Returns:
      the loaded DESede secret key
      Throws:
      Exception - if loading the key fails