Class PGEncryptionUtil
- java.lang.Object
-
- de.uplanet.lucy.server.file.encryption.PGEncryptionUtil
-
@Scriptable public class PGEncryptionUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description PGEncryptionUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddeleteEncryptedFile(IProcessingContext p_ctx, String p_strFieldGuid, Object p_recId)Delete a encrypted file from storage.static voidencrypt(String p_strAppGuid, Path p_path)static FilegetDecryptedFile(IProcessingContext p_ctx, String p_strFieldGuid, Object p_recId)Get a file from file storage and decrypt it.static voidwriteEncryptedFile(IProcessingContext p_ctx, File p_file, String p_strFieldGuid, Object p_recId, String p_strFileName)Encrypt a given file and move it to a file storage.
-
-
-
Method Detail
-
getDecryptedFile
public static File getDecryptedFile(IProcessingContext p_ctx, String p_strFieldGuid, Object p_recId) throws Exception
Get a file from file storage and decrypt it. The returned unencrypted files should be deleted by the user after usage.- Parameters:
p_ctx- processing contextp_strFieldGuid- field GUIDp_recId- record id- Returns:
- a decrypted file
- Throws:
Exception- if any occurs
-
writeEncryptedFile
public static void writeEncryptedFile(IProcessingContext p_ctx, File p_file, String p_strFieldGuid, Object p_recId, String p_strFileName) throws Exception
Encrypt a given file and move it to a file storage.- Parameters:
p_ctx- processing contextp_file- filep_strFieldGuid- field GUIDp_recId- record idp_strFileName- the destination file name- Throws:
Exception- if any occurs
-
deleteEncryptedFile
public static void deleteEncryptedFile(IProcessingContext p_ctx, String p_strFieldGuid, Object p_recId) throws Exception
Delete a encrypted file from storage.- Parameters:
p_ctx- processing contextp_strFieldGuid- field GUIDp_recId- record id- Throws:
Exception- if any occurs
-
-