*/
@SuppressWarnings("nls")
private EncryptionTool() {
- // encryptor = new BasicTextEncryptor();
- // encryptor.setPassword(secret.toString());
String out = "Found the following security algorithms:";
for (Provider p : Security.getProviders()) {
for (Service s : p.getServices()) {
public synchronized String decrypt(String cipherText) {
if (isEncrypted(cipherText)) {
String encValue = cipherText.substring(ENCRYPTED_VALUE_PREFIX.length());
- // return encryptor.decrypt(encValue);
byte[] plainByte = Base64.decodeBase64(encValue.getBytes());
byte[] decryptByte = xorWithSecret(plainByte);
return new String(decryptByte);