         }
         
         try initializer(UnsafeMutableBufferPointer(start: tempBufferPtr, count: length))
-        if (encode)
-        {
-            self.coders.encoder(UnsafeBufferPointer(start: tempBufferPtr, count: length),
-                                UnsafeMutableBufferPointer(start: self.dataRef.dataBuffer.baseAddress!, count: length))
-        }
+        let encoder = encode ? self.coders.encoder : FFDataWrapperEncoders.identity.coders.encoder
+        self.coders.encoder(UnsafeBufferPointer(start: tempBufferPtr, count: length),
+                            UnsafeMutableBufferPointer(start: self.dataRef.dataBuffer.baseAddress!, count: length))
     }
     
     

        {
            // Obfuscate the data
            utf8.withUnsafeBytes {
                self.coders.encoder(UnsafeBufferPointer(start: $0.baseAddress!.assumingMemoryBound(to: UInt8.self), count:length),
                                    UnsafeMutableBufferPointer(start: self.dataRef.dataBuffer.baseAddress!, count:length))
            }
        }
    }

        
        self.coders = coders ?? FFDataWrapperEncoders.xorWithRandomVectorOfLength(actualLength).coders
        self.dataRef = FFDataRef(length: actualLength)
        let encoder = encode ? self.coders.encoder : FFDataWrapperEncoders.identity.coders.encoder
        encoder(UnsafeBufferPointer(start: tempBufferPtr, count: actualLength),
                UnsafeMutableBufferPointer(start: self.dataRef.dataBuffer.baseAddress!, count: self.dataRef.dataBuffer.count))
        
    }
    
