Making and Using Encrypted Templates
Sometimes you will want to give someone else a WebDNA template without letting them
see your "source code" in the file. For example, if you create a WebDNA
solution that is for sale, you may not want others to be able to read the templates
and make modifications or see your proprietary algorithms.
To create an encrypted template, you must first design and debug the template as
you normally would. Then use the [Encrypt] context with a seed of "TEMPLATE"
(all upper case) to create the encrypted version of the original template. Note that
you may not use the seed "TEMPLATE" with the [decrypt] context so your
encrypted templates are safe from prying eyes. After the templates have been encrypted,
a special tag must be added to the top of the file so it can be recognized as an
encrypted file.
Use the following WebDNA to automatically encrypt your template. Note that you may
put any text, copyright information for example, before the header tag. The encrypted
WebDNA must start on the line after the <!--HAS_WEBDNA_TAGS header tag. For example,
in order to use WebDNA to automatically convert your template (FileToBeEncrypted.tpl)
to an encypted template (newfile.tpl) you would execute the following:
[writefile file=newfile.tpl&secure=F]Copyright ©2000 Smith Micro Software http://isd.smithmicro.com <!--HAS_WEBDNA_TAGS[!]Interrupt[/!]_ENCRYPTED--> [encrypt seed=TEMPLATE][include file=FileToBeEncrypted.tpl&raw=T][/encrypt][/writefile]
After using the above template, your hard disk will contain a file called "newfile.tpl" which you can give to other users, confident that they cannot read or modify it. Using the template is easy -- it works just like any other template.
The following header tag is valid for recognizing encrypted files:
HAS_WEBDNA_TAGS_ENCRYPTED - WebCatalog, Typhoon
Use a web browser to link to an encrypted page and WebCatalog will automatically
decrypt and processes the page. In order to prevent someone from displaying or accessing
the decrypted templates, the following precautions have been made: