A Way to Hide Module Code

margret

Well-Known Member
Licensed User
Longtime User
Hello,

It would be very good to have a way to write module code and to hide/compile it where it could not be viewed. I myself write many function files and don't mind sharing the functions with everyone. However, I would write more if I could only share the functions and not my code. Even in B4A if you collapse the code and could not expand it without a password might help, but they could still maybe read it in Notepad, etc. Maybe if you collapse the code module and save that module with a password, then that B4A code module could be saved as binary.

I also don't know how hard it would be for B4A to have an option to convert a Code Module to a Library. It compiles to Java anyway but this is just another thought. I would of made my Database code in a library but I am no good with Java.

Please consider a way to allow us to protect our code but to share our functions with everyone. The functions can improve B4A and we would like to do that, we just don’t want to give away all our code.:(

Thank You,

Margret
 

agraham

Expert
Licensed User
Longtime User
Just precompiling the code to a library jar would not help much as they are readily decompiled using something like JD-GUI. In fact all the Basic4android jars are open to decompilation if you want to poke around inside them to see what's happening. That's what I did while Erel was developing Basic4android. He sent me built code without the source to try and when it didn't work as expected I poked around to see what the compiler produced and what was in the jars. Even though Basic4android produces Java source code I still tend to reach for the decompiler first if I want to look at the generated code.

There are such things as obfuscators that can make it more difficult to obscure the code but in the end it can still be deconstructed.
 

margret

Well-Known Member
Licensed User
Longtime User
Helping to Protect The Code

Just precompiling the code to a library jar would not help much as they are readily decompiled using something like JD-GUI. In fact all the Basic4android jars are open to decompilation if you want to poke around inside them to see what's happening. That's what I did while Erel was developing Basic4android. He sent me built code without the source to try and when it didn't work as expected I poked around to see what the compiler produced and what was in the jars. Even though Basic4android produces Java source code I still tend to reach for the decompiler first if I want to look at the generated code.

There are such things as obfuscators that can make it more difficult to obscure the code but in the end it can still be deconstructed.

I wish I knew just a small bit of what you know!! What if there was just a way to save the Code Module as binary rather than ascii. If the .bas module was in binary it would load and run but not show source or allow edits. This would protect the code from the masses but not from someone with your skills. Of course someone with you skills would not need the source in the first place. I would hope that most people don't own or know how to use a decompiler or what to do with the code it generated.

Do you have any ideas that might help in this way? I know I could do this with DBXL and Arago but people with skills like yourself could still get in if they wanted it.

I'd love to hear your thoughts !

Thanks,

Margret
 
Last edited:

Kamac

Active Member
Licensed User
Longtime User
Also, when you share your code with someone and he can't see full code, he won't understand it properly.

That's not what sharing your code meant to be like.

You could delete the code someone isn't supposed to see and give him that 'ripped' code.
 

margret

Well-Known Member
Licensed User
Longtime User
HELPING protect Code

Dream on! After 45 years in this business there's not much I can't take apart if I want to.

Hello Agraham,

I don't know if you saw my post 4 up from this one. I know if anyone here can do this or help come up with something it would be you or Erel. There may be others but I have seen the work you and Erel have done! Please look at the post above. I would love to hear you thoughts about this. Thank you for all your work you have done here!!

Thanks,

Margret
 
Top