Esempio n. 1
0
DWORD CJabberProto::JSetStringCrypt( HANDLE hContact, char* valueName, const TCHAR* parValue )
{
	char *tmp = mir_utf8encodeT(parValue);
	sttCryptString(tmp);
	DWORD res = JSetString( hContact, valueName, tmp );
	mir_free(tmp);
	return res;
}
Esempio n. 2
0
static TCHAR* JSetStringCrypt(LPCSTR szModule, HANDLE hContact, char *valueName)
{
	DBVARIANT dbv;
	if (db_get_s(hContact, szModule, valueName, &dbv))
		return NULL;

	sttCryptString(dbv.pszVal);
	WCHAR *res = mir_utf8decodeW(dbv.pszVal);
	db_free(&dbv);
	return res;
}
Esempio n. 3
0
TCHAR* CJabberProto::JGetStringCrypt( HANDLE hContact, char* valueName )
{
	DBVARIANT dbv;

	if (DBGetContactSettingString( hContact, m_szModuleName, valueName, &dbv ))
		return NULL;

	sttCryptString(dbv.pszVal);

#ifdef UNICODE
	WCHAR *res = mir_utf8decodeW(dbv.pszVal);
#else
	mir_utf8decode(dbv.pszVal, NULL);
	char *res = mir_strdup(dbv.pszVal);
#endif

	DBFreeVariant(&dbv);
	return res;
}