DPAPI Encryption

The following code uses the Windows API CryptProtectData to encrypt the string strValue by using the logged-on user’s credentials as a key. The encrypted value is stored in the user’s personal application data directory with the name <strSettingName>.txt.

Settings.SaveEncrypted(strSettingName, strValue)

The next line of code uses the Windows API CryptUnprotectData to decrypt the setting stored in the file <strSettingName>.txt. The result is assigned to the string strValue:

strValue = Settings.LoadEncrypted(strSettingName)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.23.118