Re: [xsl] encrypt node

Subject: Re: [xsl] encrypt node
From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx>
Date: Fri, 20 Mar 2009 21:53:46 +0530
On Fri, Mar 20, 2009 at 2:31 PM, Michalmas <michalmas@xxxxxxxxx> wrote:
> Hi guys,
> does any of you have the encrypting function, based on key, that can
> be applied in template?
> M.

A google search on, "encryption in XSLT" returns quite a few results.
you can see if something from google could be useful for you.

But I think, implementing an encryption algorithm in pure XSLT may not
be a good choice. I think, though you may be able to encrypt the data
(say a string) in pure XSLT. But your algorithm could be exposed for
viewing, which may be a security weak point.

I can think of following better approaches:

1. Use an XSLT extension mechanism to call an encryption library (say
implemented in Java).

2. You can write the encryption algorithm in pure XSLT. And use a tool
like, XSLTC to compile the XSLT code into Java translets. Ref: Using this approach,
you can ask the users to use the translet to transform XML. This way,
your encryption code would not be exposed for viewing.

Mukul Gandhi

Current Thread