Package org.gcube.common.encryption
Class SymmetricKey
- java.lang.Object
-
- org.gcube.common.encryption.SymmetricKey
-
public final class SymmetricKey extends Object
- Author:
- Roberto Cirillo (ISTI - CNR), Lucio Lelii (ISTI - CNR), Luca Frosini (ISTI - CNR)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static KeygetKey()Gets the key for encryption/decryptionprotected static StringgetKeyFileName(String context)static KeyloadKeyFromFile(File keyFile, String keyAlgorithm)
-
-
-
Method Detail
-
getKey
public static Key getKey() throws InvalidKeyException
Gets the key for encryption/decryption- Returns:
- the key
- Throws:
InvalidKeyException- if the key is not available or is invalid
-
loadKeyFromFile
public static Key loadKeyFromFile(File keyFile, String keyAlgorithm) throws InvalidKeyException
- Throws:
InvalidKeyException
-
getKeyFileName
protected static String getKeyFileName(String context) throws InvalidKeyException
- Throws:
InvalidKeyException
-
-