toCharArray returns different result between Android 4.3 and previous
Android SDKs
The length of toCharArray for the code below is 2 in Android 4.3, and
others return 1., anybody know why?
byte[] SECRET_BYTES = { (byte) 0xfc, (byte) 0xbc};
Log.i("ctf3", "SECRET_BYTES - " + SECRET_BYTES.length);
String txtPwd = new String(SECRET_BYTES, "UTF-8");
char[] charsPwd = txtPwd.toCharArray();
Log.i("ctf3", "length of charsPwd - " + charsPwd.length);
No comments:
Post a Comment