source: trunk/CrypPlugins/Whirlpool/WhirlpoolSettings.cs @ 2417

Last change on this file since 2417 was 2334, checked in by Matthäus Wander, 11 years ago

removed 1006 occurences of DisplayLevel in 218 files (see #122)

  • Property svn:keywords set to URL Author Date Rev Id
  • Property svn:mime-type set to application/octet-stream
File size: 2.9 KB
Line 
1//////////////////////////////////////////////////////////////////////////////////////////////////
2// CrypTool V2
3// © 2008 - Gerhard Junker
4// Apache License see http://www.apache.org/licenses/
5//
6// $HeadURL: trunk/CrypPlugins/Whirlpool/WhirlpoolSettings.cs $
7//////////////////////////////////////////////////////////////////////////////////////////////////
8// $Revision:: 2334                                                                           $://
9// $Author:: wander                                                                           $://
10// $Date:: 2011-01-13 23:03:33 +0000 (Thu, 13 Jan 2011)                                       $://
11//////////////////////////////////////////////////////////////////////////////////////////////////
12
13using System;
14using System.Collections.Generic;
15using System.Text;
16
17using Cryptool.PluginBase;
18using Cryptool.PluginBase.Cryptography;
19using Cryptool.PluginBase.IO;
20
21using System.Security.Cryptography;
22using System.ComponentModel;
23using System.Runtime.InteropServices;
24
25using System.Windows.Controls;
26
27namespace Whirlpool
28{
29  /// <summary>
30  /// Settings for PKCS#5 v2
31  /// </summary>
32  public class WhirlpoolSettings : ISettings
33  {
34    private bool hasChanges = false;
35
36    #region ISettings Member
37
38
39
40    ///// <summary>
41    ///// length of calculated hash in bits
42    ///// </summary>
43    //private int length = 256;
44    //[TaskPane("Length", "Hash Length, the hash length in bits, must be a multiple of 8.", "", 2, false, ControlType.TextBox, ValidationType.RangeInteger, -64, 2048)]
45    //public int Length
46    //{
47    //    get
48    //    {
49    //        return length;
50    //    }
51    //    set
52    //    {
53    //        length = value;
54    //        if (length < 0) // change from bytes to bits [hack]
55    //            length *= -8;
56
57    //        while ((length & 0x07) != 0) // go to the next multiple of 8
58    //            length++;
59
60    //        hasChanges = true;
61    //        OnPropertyChanged("Settings");
62    //    }
63    //}
64
65
66
67    /// <summary>
68    /// Gets or sets a value indicating whether this instance has changes.
69    /// </summary>
70    /// <value>
71    ///         <c>true</c> if this instance has changes; otherwise, <c>false</c>.
72    /// </value>
73    public bool HasChanges
74    {
75      get
76      {
77        return hasChanges;
78      }
79      set
80      {
81        hasChanges = value;
82      }
83    }
84
85    #endregion
86
87    #region INotifyPropertyChanged Member
88
89    public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
90
91    /// <summary>
92    /// Called when [property changed].
93    /// </summary>
94    /// <param name="name">The name.</param>
95    protected void OnPropertyChanged(string name)
96    {
97      if (PropertyChanged != null)
98      {
99        PropertyChanged(this, new PropertyChangedEventArgs(name));
100      }
101      hasChanges = true;
102    }
103
104    #endregion
105  }
106}
107//
Note: See TracBrowser for help on using the repository browser.