vendredi 12 février 2016

SQLLite - Retrieve BLOB Encrypted Data

I am trying to retrieve blob encrypted data from a sqllite file. Here is my current code:

    sqlite3 *db; char *error;
    int rc;
    rc = sqlite3_open("db.sq", &db);
    if (rc)
    {
        cout << "Connection Error";
        sqlite3_close(db);
    }
    else {
        char **results = NULL;
        int rows, columns;
        const char *sqlSelect = "SELECT password FROM users";
        sqlite3_get_table(db, sqlSelect, &results, &rows, &columns, &error);
        if (rc) {
            system("color 0c");
            cout << "Query Error";
        }
        else {
            for (int i = 2; i < rows*2; i += 1) {
                cout << results[i] << endl;
            }


        }
    }

The only thing this prints, however, is a bunch of smiley faces. I assume that I am getting the data wrong, as i remember seeing a way to get blob information in the documentation, but I am not sure how to implement that.

The documentation for blob: http://ift.tt/1ENXgGO

Thanks for any help!

Aucun commentaire:

Enregistrer un commentaire