public class StringCrypter extends TomsCrypter
Modifier and Type | Field and Description |
---|---|
private static String |
APPLICATION_NAME |
private static Cipher |
cipher |
private static SecretKey |
secretKey |
static String |
SYSTEM_FILE_SEPERATOR
A holder for this clients System File Separator.
|
static String |
SYSTEM_LINE_SEPERATOR
A holder for this clients System line termination separator.
|
Constructor and Description |
---|
StringCrypter() |
Modifier and Type | Method and Description |
---|---|
String |
aesDecrypt(String encryptedText)
from https://javapapers.com/java/java-symmetric-aes-encryption-decryption-using-jce .
|
String |
aesEncrypt(String plainText)
from https://javapapers.com/java/java-symmetric-aes-encryption-decryption-using-jce .
|
private SecretKey |
generateAESSecretKey(boolean createNew) |
private SecretKey |
getAESSecretKey() |
static void |
main(String[] args)
Syntax:
java ca.bc.webarts.tools.StringCrypter [-0 | -1] [-d passwordKey] StringToCrypt |
bzip2It, decodeBase64ToAESKey, decrypt, decrypt, decryptFile, decryptFile, decryptString, encodeAESKeyToBase64, encrypt, encrypt, encryptFile, encryptFile, encryptString, ensureFolderExists, getEncryptFilemarker, jceDecryptString, jceDecryptString, jceEncryptString, jceEncryptString, printUsage, seteCryptPass, setEncryptFilemarker, unBzip2It
public static final String SYSTEM_FILE_SEPERATOR
public static final String SYSTEM_LINE_SEPERATOR
private static final String APPLICATION_NAME
public StringCrypter() throws GeneralSecurityException, IOException
GeneralSecurityException
IOException
public static void main(String[] args)
public String aesEncrypt(String plainText) throws Exception
Exception
public String aesDecrypt(String encryptedText) throws Exception
Exception
private SecretKey getAESSecretKey()
private SecretKey generateAESSecretKey(boolean createNew)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses