Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Encrypt and Decrypt an XML NodeEncrypt and decrypt the contents of a node.
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <% set xml = Server.CreateObject("AspXml.AspXml") xml.Tag = "test" xml.Content = "1234567890" ' The EncryptNode method encrypts the content ' of a node. It does not encrypt the entire sub-tree beneath ' a node. xml.EncryptNode "myPassword" xmlStr = xml.GetXml() Response.Write Server.HTMLEncode( xmlStr) & "<br>" ' Output is: <test>N7lSGKJjQ0sQ/bqmXdy0Og== </test> ' Now restore the content: xml.DecryptNode "myPassword" xmlStr = xml.GetXml() Response.Write Server.HTMLEncode( xmlStr) & "<br>" ' Output is: <test>1234567890</test> %> </body> </html> |
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.