There is old request for file encryption and decryption. But nowadays, we sometimes need to send some secret string but not in plain text. Example, we can use public MQTT service or HTTP server, post some secret command, but in encrypted format. I think we should have the implementation of java crypto for various encryption type, built-in into the script action. Something like encrypt(text_to_encrypt, "AES", "CBC", "secretkey").
The example of the AES crypto java implementation is at here :
https://www.programcreek.com/java-api-e ... rypto.java
Android documentation for the java crypto is here (it is very extensive) :
https://developer.android.com/guide/top ... yptography
Please support all various mode of the encryption for backward compatibility. Example, although ECB is not recommended, but some old application may use and we may need to decrypt from there. The hash and hmac can be included too for completeness.
Provide default configuration for the recommended encryption mode from google, or security best practices from
https://proandroiddev.com/security-best ... 16beaaade9
Since the concept is the same, please provide the action for file based encryption/decryption too, using the same implementation. The difference is we don't init the file anymore to encrypt it inside script. Since init file text only support max 1 MB, but the files we need to encrypt can be more than that.
Java Crypto, encrypt - decrypt for variable and file
Moderator: Martin
Java Crypto, encrypt - decrypt for variable and file
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Java Crypto, encrypt - decrypt for variable and file
Excellent topic. Great information here. Thank you for such a great share!
Re: Java Crypto, encrypt - decrypt for variable and file
What is @Martin's stand on this? Is this request accepted?
It would have been really helpful if you could add this feature.
It would have been really helpful if you could add this feature.
Asus Zenfone Max pro M1, Stock android, Oreo 8.1, Rooted