Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > d0c4e1920dc25df8a2e6d76abceaa14f > files > 2

jasypt-1.9.0-4.mga3.src.rpm

--- src/main/java/org/jasypt/digest/StandardStringDigester.java	2012-05-18 12:48:19.309214394 +0200
+++ src/main/java/org/jasypt/digest/StandardStringDigester.java-jhernand	2012-05-18 12:51:20.344208536 +0200
@@ -268,10 +268,6 @@
     private boolean suffixSet = false;
     
     
-    // BASE64 encoder which will make sure the returned digests are
-    // valid US-ASCII strings (if the user chooses BASE64 output).
-    // The Bsae64 encoder is THREAD-SAFE
-    private final Base64 base64;
 
 
     
@@ -281,7 +277,6 @@
     public StandardStringDigester() {
         super();
         this.byteDigester = new StandardByteDigester();
-        this.base64 = new Base64();
     }
 
 
@@ -293,7 +288,6 @@
     private StandardStringDigester(final StandardByteDigester standardByteDigester) {
         super();
         this.byteDigester = standardByteDigester;
-        this.base64 = new Base64();
     }
 
     
@@ -932,7 +926,7 @@
             // We encode the result in BASE64 or HEXADECIMAL so that we obtain
             // the safest result String possible.
             if (this.stringOutputTypeBase64) {
-                digest = this.base64.encode(digest);
+                digest = new Base64().encode(digest);
                 result.append(new String(digest, DIGEST_CHARSET)); 
             } else {
                 result.append(CommonUtils.toHexadecimal(digest));
@@ -1043,7 +1037,7 @@
             if (this.stringOutputTypeBase64) {
                 // The digest must be a US-ASCII String BASE64-encoded
                 digestBytes = processedDigest.getBytes(DIGEST_CHARSET);
-                digestBytes = this.base64.decode(digestBytes);
+                digestBytes = new Base64().decode(digestBytes);
             } else {
                 digestBytes = CommonUtils.fromHexadecimal(processedDigest);
             }