48 lines
1.9 KiB
Diff
48 lines
1.9 KiB
Diff
--- src/main/java/org/jasypt/encryption/pbe/StandardPBEStringEncryptor.java 2012-05-18 12:53:02.207205238 +0200
|
|
+++ src/main/java/org/jasypt/encryption/pbe/StandardPBEStringEncryptor.java-gil 2012-05-18 13:00:40.411190405 +0200
|
|
@@ -197,10 +197,6 @@
|
|
// The StandardPBEByteEncryptor that will be internally used.
|
|
private final StandardPBEByteEncryptor byteEncryptor;
|
|
|
|
- // BASE64 encoder which will make sure the returned results are
|
|
- // valid US-ASCII strings.
|
|
- // The Base64 encoder is THREAD-SAFE
|
|
- private final Base64 base64;
|
|
|
|
|
|
|
|
@@ -210,7 +206,6 @@
|
|
public StandardPBEStringEncryptor() {
|
|
super();
|
|
this.byteEncryptor = new StandardPBEByteEncryptor();
|
|
- this.base64 = new Base64();
|
|
}
|
|
|
|
|
|
@@ -222,7 +217,6 @@
|
|
private StandardPBEStringEncryptor(final StandardPBEByteEncryptor standardPBEByteEncryptor) {
|
|
super();
|
|
this.byteEncryptor = standardPBEByteEncryptor;
|
|
- this.base64 = new Base64();
|
|
}
|
|
|
|
|
|
@@ -645,7 +639,7 @@
|
|
// the safest result String possible.
|
|
String result = null;
|
|
if (this.stringOutputTypeBase64) {
|
|
- encryptedMessage = this.base64.encode(encryptedMessage);
|
|
+ encryptedMessage = new Base64().encode(encryptedMessage);
|
|
result = new String(encryptedMessage,ENCRYPTED_MESSAGE_CHARSET);
|
|
} else {
|
|
result = CommonUtils.toHexadecimal(encryptedMessage);
|
|
@@ -715,7 +709,7 @@
|
|
encryptedMessageBytes =
|
|
encryptedMessage.getBytes(ENCRYPTED_MESSAGE_CHARSET);
|
|
encryptedMessageBytes =
|
|
- this.base64.decode(encryptedMessageBytes);
|
|
+ new Base64().decode(encryptedMessageBytes);
|
|
} else {
|
|
encryptedMessageBytes =
|
|
CommonUtils.fromHexadecimal(encryptedMessage);
|