The following code encrypts the string strPlainText by using the 24-character string strKey24 as a key, and it assigns the encrypted string to the string strCipherText:
strCipherText = PrivateKey.Encrypt(strPlainText, _ strKey24)
The following code decrypts the string strCipherText by using the 24-character string strKey24 as a key, and it assigns the decrypted string to strPlainText. If the key is incorrect or strCipherText has been altered since encryption, the decryption will fail and raise an exception.
strPlainText = PrivateKey.Decrypt(strCipherText, _ strKey24)
3.145.92.54