Skip to main content
Used to provide encryption of data using a password. The encryption is a PBKDF2 cryptographic key derivation function. The underlying encryption algorithm is rc2. Note that all Service installations will be using the same salt.

Constructors

Pbes()

Initializes a new instance of the Pbes class.

Methods

encrypt(Byte[],String)

The content in the data array will be encrypted using the supplied password. Since this is working on binary data, you must handle character sets if converting between byte data and strings.
Returns: CRMScript.Global.Byte[] - The returned byte array contains the encrypted data Example:

decrypt(Byte[],String)

The content in the data array will be decrypted using the supplied password. Since this is working on binary data, you must handle character sets if converting between byte data and strings. Note that this method does not check if the password is the same as used when encrypting. If wrong password is used, you will get something else than the original data back.
Returns: CRMScript.Global.Byte[] - The returned byte array contains the decrypted data. Example: