Add encryption handling to updateRowById method
Extended the updateRowById method across mysql, pdo, and IDb to support encrypted fields. Updated the PDO update logic to conditionally encrypt data using DES_ENCRYPT when specified. This ensures sensitive data is managed securely during updates.
This commit is contained in:
@@ -75,11 +75,12 @@ abstract class Db implements IDb
|
||||
* @desc will update the a row with the $rowset parameter by the given id
|
||||
* @param array $rowData
|
||||
* @param int $id
|
||||
* @param string $encrypted
|
||||
* @return bool
|
||||
*/
|
||||
public function updateRowById(array $rowData, int $id): bool
|
||||
public function updateRowById(array $rowData, int $id, string $encrypted = ""): bool
|
||||
{
|
||||
return Pdo::updateRowById( self::getTable()['table'], self::getTable()['fields'], $rowData, $id );
|
||||
return Pdo::updateRowById( self::getTable()['table'], self::getTable()['fields'], $rowData, $id, $encrypted );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user