
Settings.Password = Security.MD5Digest(edtPassword)
Note:
Settings.Password – a project setting that stores the current user password for the application.
edtPassword – an edit control that accepts the password entered by the user.
MD5Digest – this method generates a unique 128-bit cryptographic message digest value derived from the contents of the input stream. This method is used to ensure the privacy of the user input.
Security.SetAlgorithm(ENCRYPT_3DES)
Variable1 = Security.Encrypt("BrightSoft!02", edtText)
Note:
ENCRYPT_3DES – a system contants that specifies the encryption algorithm used. See the Section below that describes the different encryption algorithms used in BrightSoftware platform.
“BrightSoft!02” - the encryption password.
edtText - the input text to be encrypted.
Variable1 – a base64binary form variable that will contain the result of the encryption method. You can then use this data to save to a database or an application settings to be passed to another form or another program.
You should use the same algorithm when decrypting the input string.
The sequence format for encrypting and decrypting is to always set the algorithm first with the Security.SetAlgorithm method. If the encryption algorithm is not set, the 3DES algorithm will be used as a default algorithm.
Security.SetAlgorithm(ENCRYPT_3DES)
edtDecryptResult = Security.Decrypt(edtPass, Variable1)
Note:
edtPass - the encryption password.
Variable1 - the input text to be encrypted.