aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcinzelent <zelent.marcin@gmail.com>2018-03-17 15:30:15 +0100
committermarcinzelent <zelent.marcin@gmail.com>2018-03-17 15:30:15 +0100
commit7e2a8dbd051b94115672cf22cc66ef09ba8376ca (patch)
treef73c0600f07e7cbd9d743eccdd6d680880002229 /PasswordCrackerDistributed/PasswordCrackerServer/UserInfo.cs
parent8266a5b9430ef4f6ab0d0f0572da4e6f451d0cdd (diff)
.NET Core is cool!
Diffstat (limited to 'PasswordCrackerDistributed/PasswordCrackerServer/UserInfo.cs')
-rw-r--r--PasswordCrackerDistributed/PasswordCrackerServer/UserInfo.cs38
1 files changed, 0 insertions, 38 deletions
diff --git a/PasswordCrackerDistributed/PasswordCrackerServer/UserInfo.cs b/PasswordCrackerDistributed/PasswordCrackerServer/UserInfo.cs
deleted file mode 100644
index 4432ee0..0000000
--- a/PasswordCrackerDistributed/PasswordCrackerServer/UserInfo.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using System;
-
-namespace PasswordCrackerServer
-{
- /// <summary>
- /// username + encrypted password.
- /// In the password file we store username + encrypted password.
- /// The encrypted password is a byte array (cannot be written to the password file)
- /// This must be Base64 encoded (converted to a string) before written to the file
- /// </summary>
- [Serializable]
- class UserInfo
- {
- public String Username { get; set; }
- public String EntryptedPasswordBase64 { get; set; }
- public byte[] EntryptedPassword { get; set; }
-
- public UserInfo(String username, String entryptedPasswordBase64)
- {
- if (username == null)
- {
- throw new ArgumentNullException("username");
- }
- if (entryptedPasswordBase64 == null)
- {
- throw new ArgumentNullException("entryptedPasswordBase64");
- }
- Username = username;
- EntryptedPasswordBase64 = entryptedPasswordBase64;
- EntryptedPassword = Convert.FromBase64String(entryptedPasswordBase64);
- }
-
- public override string ToString()
- {
- return Username + ":" + EntryptedPasswordBase64;
- }
- }
-}