Crypt Viewtool

Last Updated: Mar 8, 2023
documentation for the dotCMS Content Management System

The Crypt Velocity Viewtool encrypts and decrypts text using public key encryption (PublicEncryptionFactory) methods.

The following example shows how the CryptWebAPI Viewtool is mapped in the toolbox.xml file:

    <tool>
        <key>crypt</key>
        <scope>application</scope>
        <class>com.dotcms.rendering.velocity.viewtools.CryptWebAPI</class>
    </tool>

Usage

MethodDescription
$crypt.crypt(string)Encrypts input string.
$crypt.decrypt(string)Decrypts input string.

The two methods directly correspond, such that calling $crypt.decrypt($crypt.crypt("foo")) will result in foo.

On this page

×

We Dig Feedback

Selected excerpt:

×