我正在嘗試測試這個庫http://blog.cwill-dev.com/2012/10/09/encryption-between-javaandroid-and-php/使用此代碼 ApiCrypter ApiCrypter = new ApiCrypter();@Overrideprotected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_my_profile); try { String encryptedRequest = ApiCrypter.bytesToHex(this.ApiCrypter.encrypt("hello world")); Toast.makeText(this, encryptedRequest, Toast.LENGTH_LONG).show(); } catch (Exception e) { e.printStackTrace(); }在頁面中提到的示例中String encryptedRequest = ApiCrypter.bytesToHex(this.apiCrypter.encrypt(jsonParams.toString()));但是“apiCrypter”不存在所以我使用了實例“ApiCrypter”但是吐司根本沒有被觸發。我試圖在 TextView 中顯示該值,但它也是空的。請問有什么幫助嗎?
添加回答
舉報
0/150
提交
取消