package com.coding4people.mosquitoreport.api.models;

import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBAttribute;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBHashKey;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTable;

@DynamoDBTable(tableName = "email")
public class Email {
    @DynamoDBHashKey
    private String email;
    
    @DynamoDBAttribute
    private String userguid;
    
    @DynamoDBAttribute
    private String password;

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getUserguid() {
        return userguid;
    }

    public void setUserguid(String userguid) {
        this.userguid = userguid;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}

@@ -47,16 +47,52 @@
 odels;%0A%0A
+import org.mindrot.jbcrypt.BCrypt;%0A%0A
 import c
@@ -959,10 +959,461 @@
 ;%0A    %7D%0A
+    %0A    public static String encryptPassword(String rawPassword) %7B%0A        return BCrypt.hashpw(rawPassword, BCrypt.gensalt(12));%0A    %7D%0A    %0A    public static boolean checkPassword(String rawPassword, String password) %7B%0A        if(null == password %7C%7C !password.startsWith(%22$2a$%22)) %7B%0A            throw new IllegalArgumentException(%22Invalid hash provided for comparison%22);%0A        %7D%0A        %0A        return BCrypt.checkpw(rawPassword, password);%0A    %7D%0A
 %7D%0A

Add password hash methods