EncryptText - method of object Pm
The encryption of the string by the seed.
EncryptText(sText As String, sSeed As String) As String
s = Pm.EncryptText(sText, sSeed)
|sText||(String) Text that has to be encrypted|
|sSeed||(String) Seed by which the text has to be encrypted (it is necessary for the text decryption). It is recommended to use 5 characters at least.|
For the text decryption serves the Pm.DecryptText
The method can also be called in the graphic item events for Web panels
The encryption of the password and writing it to "ini" file:
VBScriptSelect and copy to clipboard
Dim sTxt, sTextCode
sTxt = "Secret text"
sTextCode = Pm.EncryptText(sTxt, "bflmpsvz")
Pm.IniFileWrite "#cfg:data.ini", "Passwords", "Password1", sTextCode
String encryption and decryption pased on specific seed.
var sTxt = "Hello";
var sTextEncrypt = Pm.EncryptText(sTxt, "bflmpsvz");
Pm.Debug("TextEncrypt = " + sTextEncrypt);
sTextDecrypt = Pm.DecryptText(sTextEncrypt, "bflmpsvz");
Pm.Debug("TextDecrypt = " + sTextDecrypt);