2012-10-10 47 views
-1

我試圖找到像無法從SQLite數據庫,通過加密值來搜索

description = "oYAFfrNS2OszASY7Vo182A==" 

加密的字符串條記錄並存儲在SQLite數據庫就像

oYAFfrNS2OszASY7Vo182A== 
在描述字段

我的Android代碼:

Cursor c = db.query(table, columns, 
       whereclause, 
       null, 
       null, 
       null, 
       null);   
    try { 
    if (c.getCount() == 0) { 
     c.close(); 
     return ""; 
    } 
    c.moveToFirst(); 

    int namecol = c.getColumnIndex(columns[0]);  
    li = (c.getString(namecol));    
    c.close();  
    } catch (Exception e) { 
    System.out.println("Exception: " + e.toString()); 
    } 

,其中表名,where子句和列都是肯定正確的,但我無法得到與我剛纔所說的加密字符串的結果。

回答

0

我通過進一步調試發現問題,實際上我的加密字符串中有一個新行字符沒有在此傳遞。