GetEncryptionLibrary()); $sValue = $oSimpleCrypt->Decrypt(MetaModel::GetConfig()->GetEncryptionKey(), $aCols[$sPrefix]); return $sValue; } /** * Encrypt the value before storing it in the database * * @param $value * * @return array * @throws Exception */ public function GetSQLValues($value) { $oSimpleCrypt = new SimpleCrypt(MetaModel::GetConfig()->GetEncryptionLibrary()); $encryptedValue = $oSimpleCrypt->Encrypt(MetaModel::GetConfig()->GetEncryptionKey(), $value); $aValues = []; $aValues[$this->Get("sql")] = $encryptedValue; return $aValues; } protected function GetChangeRecordAdditionalData(CMDBChangeOp $oMyChangeOp, DBObject $oObject, $original, $value): void { if (is_null($original)) { $original = ''; } $oMyChangeOp->Set("prevstring", $original); } protected function GetChangeRecordClassName(): string { return CMDBChangeOpSetAttributeEncrypted::class; } }