| 1 | /* |
|---|
| 2 | * $Id$ |
|---|
| 3 | * Copyright 2008-2009 The Eraser Project |
|---|
| 4 | * Original Author: Joel Low <lowjoel@users.sourceforge.net> |
|---|
| 5 | * Modified By: |
|---|
| 6 | * |
|---|
| 7 | * The algorithm in this file is implemented using the description in EMIShredder |
|---|
| 8 | * (http://www.codeplex.com/EMISecurityShredder) |
|---|
| 9 | * |
|---|
| 10 | * This file is part of Eraser. |
|---|
| 11 | * |
|---|
| 12 | * Eraser is free software: you can redistribute it and/or modify it under the |
|---|
| 13 | * terms of the GNU General Public License as published by the Free Software |
|---|
| 14 | * Foundation, either version 3 of the License, or (at your option) any later |
|---|
| 15 | * version. |
|---|
| 16 | * |
|---|
| 17 | * Eraser is distributed in the hope that it will be useful, but WITHOUT ANY |
|---|
| 18 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
|---|
| 19 | * A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
|---|
| 20 | * |
|---|
| 21 | * A copy of the GNU General Public License can be found at |
|---|
| 22 | * <http://www.gnu.org/licenses/>. |
|---|
| 23 | */ |
|---|
| 24 | |
|---|
| 25 | using System; |
|---|
| 26 | using System.Collections.Generic; |
|---|
| 27 | using System.Text; |
|---|
| 28 | using Eraser.Manager; |
|---|
| 29 | using Eraser.Util; |
|---|
| 30 | |
|---|
| 31 | namespace Eraser.DefaultPlugins |
|---|
| 32 | { |
|---|
| 33 | sealed class HMGIS5Baseline : PassBasedErasureMethod |
|---|
| 34 | { |
|---|
| 35 | public override string Name |
|---|
| 36 | { |
|---|
| 37 | get { return S._("British HMG IS5 (Baseline)"); } |
|---|
| 38 | } |
|---|
| 39 | |
|---|
| 40 | public override Guid Guid |
|---|
| 41 | { |
|---|
| 42 | get { return new Guid("{9ACDBD78-0406-4116-87E5-263E5E3B2E0D}"); } |
|---|
| 43 | } |
|---|
| 44 | |
|---|
| 45 | protected override bool RandomizePasses |
|---|
| 46 | { |
|---|
| 47 | get { return false; } |
|---|
| 48 | } |
|---|
| 49 | |
|---|
| 50 | protected override ErasureMethodPass[] PassesSet |
|---|
| 51 | { |
|---|
| 52 | get |
|---|
| 53 | { |
|---|
| 54 | return new ErasureMethodPass[] |
|---|
| 55 | { |
|---|
| 56 | new ErasureMethodPass(WriteConstant, new byte[] { (byte)0 }) |
|---|
| 57 | }; |
|---|
| 58 | } |
|---|
| 59 | } |
|---|
| 60 | } |
|---|
| 61 | |
|---|
| 62 | sealed class HMGIS5Enhanced : PassBasedErasureMethod |
|---|
| 63 | { |
|---|
| 64 | public override string Name |
|---|
| 65 | { |
|---|
| 66 | get { return S._("British HMG IS5 (Enhanced)"); } |
|---|
| 67 | } |
|---|
| 68 | |
|---|
| 69 | public override Guid Guid |
|---|
| 70 | { |
|---|
| 71 | get { return new Guid("{45671DA4-9401-46e4-9C0D-89B94E89C8B5}"); } |
|---|
| 72 | } |
|---|
| 73 | |
|---|
| 74 | protected override bool RandomizePasses |
|---|
| 75 | { |
|---|
| 76 | get { return false; } |
|---|
| 77 | } |
|---|
| 78 | |
|---|
| 79 | protected override ErasureMethodPass[] PassesSet |
|---|
| 80 | { |
|---|
| 81 | get |
|---|
| 82 | { |
|---|
| 83 | return new ErasureMethodPass[] |
|---|
| 84 | { |
|---|
| 85 | new ErasureMethodPass(WriteConstant, new byte[] { (byte)0 }), |
|---|
| 86 | new ErasureMethodPass(WriteConstant, new byte[] { (byte)0x01 }), |
|---|
| 87 | new ErasureMethodPass(WriteRandom, null), |
|---|
| 88 | }; |
|---|
| 89 | } |
|---|
| 90 | } |
|---|
| 91 | } |
|---|
| 92 | } |
|---|