Crypt Viewtool

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.