aboutsummaryrefslogtreecommitdiffstats
path: root/src/Data/Database/User.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/Database/User.cs')
-rw-r--r--src/Data/Database/User.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Data/Database/User.cs b/src/Data/Database/User.cs
new file mode 100644
index 0000000..f8b083d
--- /dev/null
+++ b/src/Data/Database/User.cs
@@ -0,0 +1,18 @@
+using IOL.Helpers;
+
+namespace VSH.Data.Database;
+
+public class User : Base
+{
+ public User(string username) => Username = username;
+ public string Username { get; set; }
+ public string Password { get; set; }
+
+ public void HashAndSetPassword(string password) {
+ Password = PasswordHelper.HashPassword(password);
+ }
+
+ public bool VerifyPassword(string password) {
+ return PasswordHelper.Verify(password, Password);
+ }
+} \ No newline at end of file