Promotic
WikipediaLinkedInYoutubeTwitterFacebook

EncryptText - method of object Pm

Description:
The encryption of the string by the seed.
Syntax:
EncryptText(sText As String, sSeed As String) As String
Calling:
s = Pm.EncryptText(sText, sSeed)
Parameters:
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.
Note:
For the text decryption serves the Pm.DecryptText method.
 
The method can also be called in the graphic item events for Web panels.
Example1:
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
Example2:
String encryption and decryption pased on specific seed.
JavaScriptVBScriptSelect and copy to clipboard

var sTxt = "Hello";
var sTextDecrypt;
var sTextEncrypt = Pm.EncryptText(sTxt, "bflmpsvz");
Pm.Debug("TextEncrypt = " + sTextEncrypt);

sTextDecrypt = Pm.DecryptText(sTextEncrypt, "bflmpsvz");
Pm.Debug("TextDecrypt = " + sTextDecrypt);
PROMOTIC 9.0.0 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- EncryptText
 
 
- Exp
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice