Class CLI
- java.lang.Object
-
- org.apache.fulcrum.jce.crypto.cli.CLI
-
public class CLI extends Object
Command line tool for encrypting/decrypting files file [enc|dec] passwd [file]* string [enc|dec] passwd plaintext- Author:
- Siegfried Goeschl
-
-
Constructor Summary
Constructors Constructor Description CLI()
-
Method Summary
Modifier and Type Method Description static void
main(String[] args)
Allows testing on the command line.static void
printHelp()
Prints usage information.static void
processFile(String cipherMode, char[] password, File sourceFile, File targetFile)
Decrypt and encrypt a single filestatic void
processFiles(String[] args)
Decrypt/encrypt a list of filesstatic void
processString(String[] args)
Decrypt/encrypt a string.
-
-
-
Method Detail
-
main
public static void main(String[] args)
Allows testing on the command line.- Parameters:
args
- the command line parameters
-
printHelp
public static void printHelp()
Prints usage information.
-
processFiles
public static void processFiles(String[] args) throws Exception
Decrypt/encrypt a list of files- Parameters:
args
- the command line- Throws:
Exception
- the operation failed
-
processFile
public static void processFile(String cipherMode, char[] password, File sourceFile, File targetFile) throws Exception
Decrypt and encrypt a single file- Parameters:
cipherMode
- the modepassword
- the passwordsourceFile
- the file to processtargetFile
- the target file- Throws:
Exception
- the operation failed
-
-