- Timestamp:
- 05/05/09 14:55:10 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Security.Contracts/3.2/BusinessObjects/User.cs
r1737 r1738 30 30 [DataContract] 31 31 public class User : PermissionOwner { 32 33 [DataMember] 34 public String Login { get; set; } 35 36 private String password; 37 38 [DataMember] 39 public String Password { 40 get { 41 return this.password; 42 } 43 protected set { 44 this.password = value; 45 } 46 } 47 48 [DataMember] 49 public String MailAddress { get; set; } 50 51 public void SetPlainPassword(String password) { 52 this.password = password; 53 } 54 55 public void SetHashedPassword(String password) { 56 this.password = getMd5Hash(password); 57 } 58 32 59 private static string getMd5Hash(string input) { 33 60 // Create a new instance of the MD5CryptoServiceProvider object. … … 50 77 return sBuilder.ToString(); 51 78 } 52 53 54 [DataMember]55 public String Login { get; set; }56 57 private String password;58 59 [DataMember]60 public String Password {61 get {62 return this.password;63 }64 set {65 this.password = getMd5Hash(value);66 }67 }68 69 public void SetPlainPassword(String password) {70 this.password = password;71 }72 73 [DataMember]74 public String MailAddress { get; set; }75 79 } 76 80 }
Note: See TracChangeset
for help on using the changeset viewer.