Private Key Encryption


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)




Security for Microsoft Visual Basic  .NET
Security for Microsoft Visual Basic .NET
ISBN: 735619190
EAN: N/A
Year: 2003
Pages: 168

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net