Ignore:
Timestamp:
5/1/2009 5:19:43 AM (6 years ago)
Author:
lowjoel
Message:

-No publicly accessible nested types
-Replaced the ErasureMethod?.Pass class with the ErasureMethodPass? class and removed the WriteConstant? and WriteRandom? delegates which pointed to real functions in ErasureMethod?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/DefaultPlugins/EraseDoD.cs

    r938 r956  
    4545        } 
    4646 
    47         protected override Pass[] PassesSet 
     47        protected override ErasureMethodPass[] PassesSet 
    4848        { 
    4949            get 
     
    5353                int rand = prng.Next(); 
    5454 
    55                 Pass[] result = new Pass[] 
     55                ErasureMethodPass[] result = new ErasureMethodPass[] 
    5656                { 
    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) 
    6464                }; 
    6565 
    6666                //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[] { 
    6868                    (byte)(~((byte[])result[0].OpaqueValue)[0]) }); 
    69                 result[5] = new Pass(WriteConstant, new byte[] { 
     69                result[5] = new ErasureMethodPass(WriteConstant, new byte[] { 
    7070                    (byte)(~((byte[])result[4].OpaqueValue)[0]) }); 
    7171                return result; 
     
    9191        } 
    9292 
    93         protected override Pass[] PassesSet 
     93        protected override ErasureMethodPass[] PassesSet 
    9494        { 
    9595            get 
    9696            { 
    97                 return new Pass[] 
     97                return new ErasureMethodPass[] 
    9898                { 
    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) 
    102102                }; 
    103103            } 
Note: See TracChangeset for help on using the changeset viewer.