Changeset 956 for branches/eraser6/DefaultPlugins/EraseDoD.cs
- Timestamp:
- 5/1/2009 5:19:43 AM (4 years ago)
- File:
-
- 1 edited
-
branches/eraser6/DefaultPlugins/EraseDoD.cs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/DefaultPlugins/EraseDoD.cs
r938 r956 45 45 } 46 46 47 protected override Pass[] PassesSet47 protected override ErasureMethodPass[] PassesSet 48 48 { 49 49 get … … 53 53 int rand = prng.Next(); 54 54 55 Pass[] result = newPass[]55 ErasureMethodPass[] result = new ErasureMethodPass[] 56 56 { 57 new Pass(WriteConstant, new byte[] { (byte)(rand & 0xFF) }),58 new Pass(WriteConstant, new byte[] { 0 }),59 new Pass(WriteRandom, null),60 new Pass(WriteConstant, new byte[] { (byte)((rand >> 8) & 0xFF) }),61 new Pass(WriteConstant, new byte[] { (byte)((rand >> 16) & 0xFF) }),62 new Pass(WriteConstant, new byte[] { 0 }),63 new Pass(WriteRandom, null)57 new ErasureMethodPass(WriteConstant, new byte[] { (byte)(rand & 0xFF) }), 58 new ErasureMethodPass(WriteConstant, new byte[] { 0 }), 59 new ErasureMethodPass(WriteRandom, null), 60 new ErasureMethodPass(WriteConstant, new byte[] { (byte)((rand >> 8) & 0xFF) }), 61 new ErasureMethodPass(WriteConstant, new byte[] { (byte)((rand >> 16) & 0xFF) }), 62 new ErasureMethodPass(WriteConstant, new byte[] { 0 }), 63 new ErasureMethodPass(WriteRandom, null) 64 64 }; 65 65 66 66 //Set passes 2 and 6 to be complements of 1 and 5 67 result[1] = new Pass(WriteConstant, new byte[] {67 result[1] = new ErasureMethodPass(WriteConstant, new byte[] { 68 68 (byte)(~((byte[])result[0].OpaqueValue)[0]) }); 69 result[5] = new Pass(WriteConstant, new byte[] {69 result[5] = new ErasureMethodPass(WriteConstant, new byte[] { 70 70 (byte)(~((byte[])result[4].OpaqueValue)[0]) }); 71 71 return result; … … 91 91 } 92 92 93 protected override Pass[] PassesSet93 protected override ErasureMethodPass[] PassesSet 94 94 { 95 95 get 96 96 { 97 return new Pass[]97 return new ErasureMethodPass[] 98 98 { 99 new Pass(WriteConstant, new byte[] { 0 }),100 new Pass(WriteConstant, new byte[] { 0xFF }),101 new Pass(WriteRandom, null)99 new ErasureMethodPass(WriteConstant, new byte[] { 0 }), 100 new ErasureMethodPass(WriteConstant, new byte[] { 0xFF }), 101 new ErasureMethodPass(WriteRandom, null) 102 102 }; 103 103 }
Note: See TracChangeset
for help on using the changeset viewer.
