加密一个指定字符串。
命名空间: Microsoft.VisualStudio.Data.Services
程序集: Microsoft.VisualStudio.Data.Services(在 Microsoft.VisualStudio.Data.Services.dll 中)
语法
声明
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
参数
- s
类型:System.String
加密的字符串。
返回值
类型:System.String
返回该加密的字符串。
异常
异常 | 条件 |
---|---|
CryptographicException | 加密失败。 |
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。