如何创建加密的Jar文件? [英] How to create encrypted Jar file?

查看:203
本文介绍了如何创建加密的Jar文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从事项目,必须保护数据(揭示代码不是主要问题)文件。我们正在使用Java + Netbeans。有没有什么工具可以加密格式创建jar?我们也使用sqlite数据库 - 所以把加密格式的文本文件也不适合我们。

解决方案

创建加密JAR是不可能的,因为执行的JavaVM必须以某种方式能够读取要执行的数据。
与虚拟机类似,任何具有正确工具和专有技术的人都可以从JAR中提取所有数据。



如果是可能加密JAR,您还必须向客户端提供一些解密密钥或设施,该客户端希望执行JAR,这完全违背了加密的目的。



你可以得到的最好的是混淆,但对于雄心勃勃的攻击者来说,这不是真正的安全或障碍。


I am working on project that must need to protect data (revealing code is not main problem) files. We are using Java + Netbeans. Is there any facility that will create jar in encrypted format? We are also using sqlite for database - so putting text file in encrypted format is not proper option for us too.

解决方案

Creating encrypted JARs is not possible, since the executing JavaVM has to somehow be able to read the data it wants to execute. And similar to a VM it would be possible for anyone with the proper tools and know-how to extract all data from the JAR.

If it would be possible to encrypt the JAR, you would also have to provide some decryption-key or facility to the client which wants to execute the JAR which defeats the purpose of encryption at all.

The best you can get is obfuscation, but that's no real security or hurdle for the ambitious attacker.

这篇关于如何创建加密的Jar文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆