简体   繁体   English

XSD架构字符串元素Encrypt / Decrypt

[英]XSD schema string elements Encrypt/Decrypt

How could I make the XSD schema string element(password) as type encrypted, This in turn would be used in XSD to java code generator encrypt and decrypt during Writing/Reading process of XML not just validation. 如何将XSD架构字符串元素(密码)设置为加密类型,这反过来将在XSD中用于java代码生成器在XML的写入/读取过程中加密和解密,而不仅仅是验证。

Does any XSD to java class generator provide this feature ?? 是否有任何XSD到java类生成器提供此功能?

Cheers, Reddy. 干杯,雷迪。

You can use an XmlAdapter to control how the data is converted between XML and Java. 您可以使用XmlAdapter来控制数据在XML和Java之间的转换方式。 This XmlAdapter is used to hook in your own encryption logic. XmlAdapter用于挂钩您自己的加密逻辑。

Below is a link to an answer I gave that demonstrates how to create an XmlAdapter when generating the model from XML Schema. 下面是我给出的答案的链接,演示了如何在从XML Schema生成模型时创建XmlAdapter

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

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