次の関数でいくつかの文字列を保護します。
public static string ProtectString(string input)
{
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
return enc.GetString(MachineKey.Protect(enc.GetBytes(input), null));
}
文字列を暗号化すると、攻撃者は (ユーザー名など)、暗号化および復号化された値を使用してマシン キーを抽出できますか?