简体   繁体   English

是否可以加密faces-config文件的某些部分?

[英]Is it possible to encrypt portions of faces-config file?

I am working with JSF 2.1 Mojarra. 我正在使用JSF 2.1 Mojarra。 I have a Managed Bean that is initialized in the faces-config file. 我有一个在faces-config文件中初始化的托管Bean。 There is some sensitive information in this file that I would like to encrypt. 我要加密此文件中的一些敏感信息。 Is this possible? 这可能吗? Or do I need to manage the object creation through some other mechanism. 还是我需要通过其他机制来管理对象的创建。

I would encrypt the data, then convert it to text either as hex or base64 encoding and put thr resulting string into you config - it just text so thee will be no problem. 我会加密数据,然后将其转换为十六进制或base64编码的文本,并将thr结果字符串放入您的配置中-它只是文本,因此您不会有问题。

Have the class that uses the data decode and decrypt the data before using it. 在使用数据之前,请具有使用数据的类对数据进行解码和解密。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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