Promotic
WikipediaLinkedInYoutubeTwitterFacebook

DecryptText - method of object Pm

Description:
The text decryption that has been encrypted by the Pm.EncryptText method.
Syntax:
DecryptText(sText As String, sSeed As String) As String
Calling:
s = Pm.DecryptText(sEncrypted, sSeed)
Parameters:
sText(String) Text that has to be decrypted
sSeed(String) Seed used for text decryption
Note:
The knowledge of the seed used on the encryption is required for the decryption.
 
The method can also be called in the graphic item events for Web panels.
Example1:
Reading and the decryption of the password from "ini" file:
VBScriptSelect and copy to clipboard

Dim sTxtCode, sTextDecode
sTxtCode = Pm.IniFileRead("#cfg:data.ini", "Passwords", "Password1", "")
sTextDecode = Pm.DecryptText(sTxtCode, "bflmpsvz")
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 8.3.26 SCADA system documentation - MICROSYS, spol. s r.o.

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