I'm trying to decrypt a password stored in a MySQL Workbench database. I used codeigniter's Encrypt() function. It goes into the database just fine. But when I try and run this code, I get the error: Message: strlen() expects parameter 1 to be string, object given Filename: libraries/Encryption.php I want to compare the entered password through the form to the decrypted password from the database and see if they match. I'm not sure how to rectify this and I know this might be a very rookie question but I am very much stumped. Thank you for any help!
                {               
                    $this->db->select("custPassword"); 
                    $this->db->from('customer');
                    $this->db->where('custEmail', $customerEmail);
                    $passencrypted = $this->db->get();
                    
                    $passplain = $this->encryption->decrypt($passencrypted);
                    
                    $this->db->select("custNumber"); 
                    $this->db->from('customer');
                    $this->db->where('custEmail', $customerEmail);
                    $this->db->where('custPassword', $passplain);
                    $query = $this->db->get();
            
                    $count = $query->num_rows();
                    if($count == 1)
                    {
                        return true;
                    }
                    else
                    {
                        return false;```
 
    