Class KeyFactory

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

public class KeyFactory extends Object
A simplified keys generator for the most common algorithms
Author:
Manuele Simi (CNR), Roberto Cirillo (ISTI - CNR), Luca Frosini (ISTI - CNR)
  • Constructor Details

    • KeyFactory

      public KeyFactory()
  • Method Details

    • newAESKey

      public static SecretKey newAESKey() throws Exception
      Generates an AES key
      Returns:
      the generated AES secret key
      Throws:
      Exception - if key generation fails
    • newTripleDESKey

      public static SecretKey newTripleDESKey() throws Exception
      Generates a TripleDES key
      Returns:
      the generated TripleDES secret key
      Throws:
      Exception - if key generation fails
    • newRijndaelKey

      public static SecretKey newRijndaelKey() throws Exception
      Generates a Rijndael key
      Returns:
      the generated Rijndael secret key
      Throws:
      Exception - if key generation fails
    • newDESKey

      public static SecretKey newDESKey() throws Exception
      Generates a DES key
      Returns:
      the generated DES secret key
      Throws:
      Exception - if key generation fails