Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is a bug? #27

Open
liaoxuewei opened this issue Mar 15, 2019 · 0 comments
Open

Is a bug? #27

liaoxuewei opened this issue Mar 15, 2019 · 0 comments

Comments

@liaoxuewei
Copy link

liaoxuewei commented Mar 15, 2019

int
GetCipherType(sqlite3* db)
{
CodecParameter* codecParams = (db != NULL) ? GetCodecParams(db) : codecParameterTable;
CipherParams* cipherParamTable = (codecParams != NULL) ? codecParams[0].m_params : commonParams;
#if 0
if (codecParams == NULL)
{
return value;
}

int j = 0;
for (j = 0; strlen(codecParams[j].m_name) > 0; ++j)
{
if (sqlite3_stricmp(cipherName, codecParams[j].m_name) == 0) break;
}
if (strlen(codecParams[j].m_name) > 0)
{
cipherParamTable = codecParams[j].m_params;
}
#endif

int cipherType = CODEC_TYPE;
CipherParams* cipher = cipherParamTable;
for (; strlen(cipher->m_name) > 0; ++cipher)
{
if (sqlite3_stricmp("cipher", cipher->m_name) == 0) break;
}
if (strlen(cipher->m_name) > 0)
{
cipherType = cipher->m_value;
cipher->m_value = cipher->m_default; // Why to change value to default value? Specifies cipher at runtime, will cause error when attach database twice or more~
}

return cipherType;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant