/** * @todo Implement testIsEncField(). */ public function testIsEncField() { $this->assertTrue(CryptoQuery::isEncField('emp_ssn_num')); $this->assertTrue(CryptoQuery::isEncField('ebsal_basic_salary')); $this->assertFalse(CryptoQuery::isEncField('sal_grd_code')); }
function simpleSelect($selectTable, $selectFields, $selectConditions = null, $selectOrderBy = null, $selectOrder = null, $selectLimit = null) { /* For Encryption : Begins */ $encOn = KeyHandler::KeyExists(); if ($encOn && CryptoQuery::isEncTable($this->table_name)) { $selectFields = CryptoQuery::prepareDecryptFields($selectFields); } /* For Encryption : Ends */ $query = $this->_buildSelect($selectFields) . " FROM {$selectTable} "; if (isset($selectConditions)) { $query .= $this->_buildWhere($selectConditions); } if (isset($selectOrderBy)) { $query .= " ORDER BY {$selectOrderBy} {$selectOrder}"; } if (isset($selectLimit)) { $query .= " LIMIT {$selectLimit}"; } return $query; }