简体   繁体   中英

Is Kotlin harder to reverse engineer than java

I am deciding which one to use for an Android Studio project and I am willing to use Kotlin. If there is an advantage in terms of being harder to reverse engineer than java.

No. Kotlin doesn't have such intention. Unlike Scala or Groovy (and many other more magical JVM languages), Kotlin's bytecode structure isn't too much complicated, which means using kotlin has no advantage over plain Java when it comes to avoiding reverse engineering.

Anyway, you shouldn't pay attention to this unless your app contains something magical, eg a special method to skip some security constrains taking advantage of a certain android bug, a special code containing your private key (which is bad practice), etc..

This SO post on avoiding reverse engineering may interest you.


Off-topic: Scala is harder to reverse engineer because Scala is hard to understand. Its generated bytecode often has nothing in common with its source code. I once want to explain what's happening behind all those implicit and other, yet I just found a pile of mess. (you shouldn't use javap for understanding scala code, scala has other utilities) And groovy is because it's a dynamic language and it has a whole lot of magic in its bytecode form just to make it dynamic . I knew this because I went to discover how my gradle build script worked during the development of a gradle plugin. I did find the resulting class file but I can't even find where dependencies block is in its deassembled form.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM