Partager via


DataProtection.EncryptString Method

Encrypts a specified string.

Namespace:  Microsoft.VisualStudio.Data.Services
Assembly:  Microsoft.VisualStudio.Data.Services (in Microsoft.VisualStudio.Data.Services.dll)

Syntax

'Declaration
Public Shared Function EncryptString ( _
    s As String _
) As String
public static string EncryptString(
    string s
)
public:
static String^ EncryptString(
    String^ s
)
static member EncryptString : 
        s:string -> string
public static function EncryptString(
    s : String
) : String

Parameters

Return Value

Type: System.String
Returns the encrypted string.

Exceptions

Exception Condition
CryptographicException

The encryption failed.

.NET Framework Security

See Also

Reference

DataProtection Class

Microsoft.VisualStudio.Data.Services Namespace