User Tools

Site Tools


notes:csharp:strings

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
notes:csharp:strings [2018/01/09]
leszek [ASCII encoding]
notes:csharp:strings [2018/01/09] (current)
leszek [SecureString]
Line 250: Line 250:
 The //Marshal// class offers methods that can be used when converting a //​SecureString//​ to a normal string. Those methods accept a //​SecureString//​ and return an //IntPtr//. Each method has a corresponding method that needs to be called to clear the internal buffer. For example, the //​SecureStringToGlobalAllocUnicode//​ method has the corresponding //​ZeroFreeGlobalAllocUnicode//​ method. The //Marshal// class offers methods that can be used when converting a //​SecureString//​ to a normal string. Those methods accept a //​SecureString//​ and return an //IntPtr//. Each method has a corresponding method that needs to be called to clear the internal buffer. For example, the //​SecureStringToGlobalAllocUnicode//​ method has the corresponding //​ZeroFreeGlobalAllocUnicode//​ method.
  
-**Example**: Convert the //​SecurityString//​ to a normal string:+Example: Convert the //​SecurityString//​ to a normal string:
 <code csharp> <code csharp>
 using System; using System;
notes/csharp/strings.txt ยท Last modified: 2018/01/09 by leszek