summaryrefslogtreecommitdiff
path: root/plugins/Dbx_sqlite
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 16:39:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 16:39:04 +0300
commit62a186697df33c96dc1a6dac0f4dfc38652fb96f (patch)
tree1437d0906218fae8827aed384026f2b7e656f4ac /plugins/Dbx_sqlite
parentfcbb395dc7ff3edab972b6d4b27dbbfb3305f5d7 (diff)
BYTE -> uint8_t
Diffstat (limited to 'plugins/Dbx_sqlite')
-rw-r--r--plugins/Dbx_sqlite/src/dbcrypt.cpp8
-rwxr-xr-xplugins/Dbx_sqlite/src/dbevents.cpp12
-rwxr-xr-xplugins/Dbx_sqlite/src/dbsettings.cpp2
3 files changed, 11 insertions, 11 deletions
diff --git a/plugins/Dbx_sqlite/src/dbcrypt.cpp b/plugins/Dbx_sqlite/src/dbcrypt.cpp
index bfb7d29a8c..22f905d761 100644
--- a/plugins/Dbx_sqlite/src/dbcrypt.cpp
+++ b/plugins/Dbx_sqlite/src/dbcrypt.cpp
@@ -34,7 +34,7 @@ STDMETHODIMP_(BOOL) CDbxSQLite::ReadCryptoKey(MBinBuffer &buf)
STDMETHODIMP_(BOOL) CDbxSQLite::StoreCryptoKey()
{
size_t iKeyLength = m_crypto->getKeyLength();
- BYTE *pKey = (BYTE*)_alloca(iKeyLength);
+ uint8_t *pKey = (uint8_t*)_alloca(iKeyLength);
m_crypto->getKey(pKey, iKeyLength);
mir_cslock lock(m_csDbAccess);
@@ -114,14 +114,14 @@ STDMETHODIMP_(BOOL) CDbxSQLite::EnableEncryption(BOOL bEncrypt)
continue;
int id = sqlite3_column_int(stmt, 0);
- auto *pBlob = (const BYTE *)sqlite3_column_blob(stmt, 2);
+ auto *pBlob = (const uint8_t *)sqlite3_column_blob(stmt, 2);
unsigned cbBlob = sqlite3_column_bytes(stmt, 2);
- mir_ptr<BYTE> pNewBlob;
+ mir_ptr<uint8_t> pNewBlob;
size_t nNewBlob;
if (dwFlags & DBEF_ENCRYPTED) {
- pNewBlob = (BYTE*)m_crypto->decodeBuffer(pBlob, cbBlob, &nNewBlob);
+ pNewBlob = (uint8_t*)m_crypto->decodeBuffer(pBlob, cbBlob, &nNewBlob);
dwFlags &= (~DBEF_ENCRYPTED);
}
else {
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp
index 1bd57740f5..d44f7fd062 100755
--- a/plugins/Dbx_sqlite/src/dbevents.cpp
+++ b/plugins/Dbx_sqlite/src/dbevents.cpp
@@ -92,10 +92,10 @@ MEVENT CDbxSQLite::AddEvent(MCONTACT hContact, const DBEVENTINFO *dbei)
}
else szEventId = "";
- mir_ptr<BYTE> pCryptBlob;
+ mir_ptr<uint8_t> pCryptBlob;
if (m_bEncrypted) {
size_t len;
- BYTE *pResult = m_crypto->encodeBuffer(tmp.pBlob, tmp.cbBlob, &len);
+ uint8_t *pResult = m_crypto->encodeBuffer(tmp.pBlob, tmp.cbBlob, &len);
if (pResult != nullptr) {
pCryptBlob = tmp.pBlob = pResult;
tmp.cbBlob = (uint16_t)len;
@@ -219,10 +219,10 @@ BOOL CDbxSQLite::EditEvent(MCONTACT hContact, MEVENT hDbEvent, const DBEVENTINFO
return 1;
DBEVENTINFO tmp = *dbei;
- mir_ptr<BYTE> pCryptBlob;
+ mir_ptr<uint8_t> pCryptBlob;
if (m_bEncrypted) {
size_t len;
- BYTE *pResult = m_crypto->encodeBuffer(tmp.pBlob, tmp.cbBlob, &len);
+ uint8_t *pResult = m_crypto->encodeBuffer(tmp.pBlob, tmp.cbBlob, &len);
if (pResult != nullptr) {
pCryptBlob = tmp.pBlob = pResult;
tmp.cbBlob = (uint16_t)len;
@@ -318,12 +318,12 @@ BOOL CDbxSQLite::GetEvent(MEVENT hDbEvent, DBEVENTINFO *dbei)
dbei->cbBlob = cbBlob;
if (bytesToCopy && dbei->pBlob) {
- BYTE *data = (BYTE *)sqlite3_column_blob(stmt, 5);
+ uint8_t *data = (uint8_t *)sqlite3_column_blob(stmt, 5);
if (dbei->flags & DBEF_ENCRYPTED) {
dbei->flags &= ~DBEF_ENCRYPTED;
size_t len;
- BYTE* pBlob = (BYTE*)m_crypto->decodeBuffer(data, cbBlob, &len);
+ uint8_t* pBlob = (uint8_t*)m_crypto->decodeBuffer(data, cbBlob, &len);
if (pBlob == nullptr)
return 1;
diff --git a/plugins/Dbx_sqlite/src/dbsettings.cpp b/plugins/Dbx_sqlite/src/dbsettings.cpp
index fc6f6c4c3a..b4b5551cea 100755
--- a/plugins/Dbx_sqlite/src/dbsettings.cpp
+++ b/plugins/Dbx_sqlite/src/dbsettings.cpp
@@ -48,7 +48,7 @@ void CDbxSQLite::InitSettings()
dbv->cpbVal = sqlite3_column_bytes(stmt, 1);
{
const char *data = (const char *)sqlite3_column_blob(stmt, 1);
- dbv->pbVal = (BYTE *)mir_alloc(dbv->cpbVal + 1);
+ dbv->pbVal = (uint8_t *)mir_alloc(dbv->cpbVal + 1);
memcpy(dbv->pbVal, data, dbv->cpbVal);
dbv->pbVal[dbv->cpbVal] = 0;
}