Class PGEncryptionUtil
java.lang.Object
de.uplanet.lucy.server.file.encryption.PGEncryptionUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
deleteEncryptedFile
(IProcessingContext p_ctx, String p_strFieldGuid, Object p_recId) Delete a encrypted file from storage.static void
static File
getDecryptedFile
(IProcessingContext p_ctx, String p_strFieldGuid, Object p_recId) Get a file from file storage and decrypt it.static void
writeEncryptedFile
(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.
-
Constructor Details
-
PGEncryptionUtil
public PGEncryptionUtil()
-
-
Method Details
-
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
-
encrypt
-