public class CLI2 extends Object
java -classpath target/classes org.apache.fulcrum.jce.crypto.cli.CLI2 string enc changeit mysecretgeheim
java -jar target/fulcrum-yaafi-crypto-1.0.8.jar string enc changeit mysecretgeheim...
java java -jar target/fulcrum-yaafi-crypto-1.0.8.jar string dec changeit anothersecret
| Constructor and Description |
|---|
CLI2() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isHexadecimal(String input) |
static void |
main(String[] args)
Allows usage on the command line.
|
static void |
printHelp()
Prints usage information.
|
static void |
processFile(String cipherMode,
char[] password,
File sourceFile,
File targetFile)
Decrypt/encrypt a single file
|
static void |
processFiles(String[] args)
Decrypt/encrypt a list of files
|
static void |
processString(String[] args)
Decrypt and encrypt a string.
|
static String |
processString(String cipherMode,
char[] password,
String value)
Decrypt and encrypt a string.
|
public static void main(String[] args)
args - the command line parameterspublic static void printHelp()
public static void processFiles(String[] args) throws Exception
args - the command lineException - the operation failedpublic static void processFile(String cipherMode, char[] password, File sourceFile, File targetFile) throws Exception
cipherMode - the modepassword - the passwordsourceFile - the file to processtargetFile - the target fileException - the operation failedpublic static void processString(String[] args) throws Exception
args - the command lineException - the operation failedpublic static String processString(String cipherMode, char[] password, String value) throws Exception
cipherMode - \"dec|enc\" + @link{TYPES}password - as char arrayvalue - String to be en/decryptedException - the operation failedpublic static boolean isHexadecimal(String input)
Copyright © 2008–2020 The Apache Software Foundation. All rights reserved.