[TIMOB-26376] Android: Remove "commons-codec.jar" and replace with Java "MessageDigest"
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Low |
Status | Closed |
Resolution | Done |
Resolution Date | 2018-10-29T22:10:58.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 7.5.0 |
Components | Android |
Labels | android, hash |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2018-09-11T00:20:11.000+0000 |
Updated | 2018-10-29T22:10:58.000+0000 |
Description
*Summary:*
The Titanium SDK currently uses the Apache "commons-codec.jar" to generate MD5 hashes for its JavaScripts APIs such as
Ti.Utils.md5HexDigest()
and internally via the Java DigestUtils
class.
We should remove this JAR file to reduce APK bloat and replace its usage with the built-in Java "MessageDigest" class provided by Android here...
https://developer.android.com/reference/java/security/MessageDigest
To simplify the transition, we can create our own Titanium TiDigestUtils
Java class to ease the transition internally.
*Note:*
This was changed was suggested when Apache hashing broke when an app targets Android P. Please see the discussion in the PR below...
https://github.com/appcelerator/titanium_mobile/pull/10253
PR (master): https://github.com/appcelerator/titanium_mobile/pull/10253
Fixed as part of TIMOB-26297