How Do I Apply a Custom Encryption Algorithm to AgileForms Data?

To apply your own encryption algorithm to AgileForms data, do the following.

Navigation

  1. On the AgileForms Server machine, open the file [AgileForms Server installation folder]\Webroot\web.config

Instructions

  1. Create a class library project in Visual Studio.
  2. Add Ascentn.Workflow.Share in the assembly reference.
  3. Create a class which implements the interface IEncryptDecrypt and the two methods in that interface which are Decrypt and Encrypt.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Ascentn.Workflow.Base;
    
    namespace DataSecurityEncryptorDecryptor
    {
          public class security : IEncryptDecrypt
          {
              const string m_password = "pass@word1";
              #region IEncryptDecrypt Members
              public string Decrypt(string data)
              {
                  return ShUtil.Decrypt(m_password, data);
              }
              public string Encrypt(string data)
              {
                  return ShUtil.Encrypt(m_password, data);
              }
              #endregion
           }
    }
  4. Build the project.
  5. Copy your DLL file and place in the location: [AgileForms Server installation folder]\Webroot\bin.

    For example, DataSecurityEncryptorDecryptor.dll

    The DLL file name DataSecurityEncryptorDecryptor.dll depends on your project name.

  6. Open the file [AgileForms Server installation folder]\Webroot\web.config.

    If custom DLL not present or the key does not exist in the web.config file, it uses a default AgilePoint encryption key.

  7. In the text editor, add the following key to the appSettings node:
    Field Name Definition

    DataSecurity

    Definition:
    Specifies an encryption algorithm for AgileForms Data Security. This setting applies when Encrypt is selected for field level data security.
    Allowed Values:
    An appSettings key in the following format:

    <add key="DataSecurity" value="[DLL name], [namespace.classname]" />

    Default Value:
    If this key is not added, the default AgilePoint encryption algorithm is used.
    Example:
    <add key="DataSecurity" value="DataSecurityEncryptorDecryptor,DataSecurityEncryptorDecryptor.Security" />

More Information

For more information, see the following.