Hello developers,
I tried to decrypt a 4.2 MB .dcf file using AES 128 bit key, but it took 33
seconds to decrypt (on function cipher.doFinal(data)), is it normal ?
Here is a code snippet:
long start = System.currentTimeMillis()/1000L;
try {
SecretKeySpec skeySpec = new SecretKeySpec(key, "AES");
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
cipher.init(Cipher.DECRYPT_MODE, skeySpec, ivspec);
android.util.Log.d("TEST", "Start decoding...." +
String.valueOf(length));
byte[] decrypted = cipher.doFinal(content);
File file2 = newFile(Environment.getExternalStorageDirectory().getPath() +
"/test.mp3");
OutputStream os = new FileOutputStream(file2);
os.write(decrypted);
} catch (Exception ex) {
ex.printStackTrace();
}
long end = System.currentTimeMillis()/1000L;
android.util.Log.d("TEST","Time "+ String.valueOf(end-start));
Thanx in advance..
--
Kind Regards
- Lorensius W. L. T -
- http://www.londatiga.net -
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en