Author: juiceman
Date: 2007-09-10 04:11:07 +0000 (Mon, 10 Sep 2007)
New Revision: 15107

Modified:
   trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java
Log:
Remove more pre-1010 cruft.  Review encouraged

Modified: 
trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java
===================================================================
--- trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java  
2007-09-10 04:00:24 UTC (rev 15106)
+++ trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java  
2007-09-10 04:11:07 UTC (rev 15107)
@@ -33,7 +33,6 @@
        /** The decryption key. */
        private final byte[] key;
        /** Broken (old) encryption? */
-       private final boolean brokenEncryption;
        private long dataLength;
        private boolean readOnly;
        private int lastOutputStream;
@@ -50,7 +49,6 @@
                this.origRandom = origRandom;
                this.bucket = bucket;
                if(bucket.size() != 0) throw new 
IllegalArgumentException("Bucket must be empty");
-               brokenEncryption = false;
                byte[] tempKey = new byte[32];
                origRandom.nextBytes(tempKey);
                this.key = tempKey;
@@ -76,7 +74,6 @@
                this.dataLength = knownSize;
                this.origRandom = origRandom;
                this.bucket = bucket;
-               brokenEncryption = oldCrypto;
                if(key.length != 32) throw new IllegalArgumentException("Key 
wrong length: "+key.length);
                this.key = key;
                this.minPaddedSize = minSize;
@@ -101,7 +98,6 @@
                tmp = fs.get("DecryptKey");
                if(tmp == null)
                        throw new CannotCreateFromFieldSetException("No key");
-               brokenEncryption = fs.get("CryptoType") == null;
                key = HexUtil.hexToBytes(tmp);
                if(key.length != 32) throw new IllegalArgumentException("Key 
wrong length: "+key.length);
                tmp = fs.get("MinPaddedSize");
@@ -364,8 +360,6 @@
                        return null;
                }
                fs.put("MinPaddedSize", minPaddedSize);
-               if(!brokenEncryption)
-                       fs.putSingle("CryptoType", "aes256");
                return fs;
        }



Reply via email to