Csharp/C Sharp by API/System.Web.Security/FormsAuthentication

Материал из .Net Framework эксперт
Перейти к: навигация, поиск

FormsAuthentication.HashPasswordForStoringInConfigFile

  
using System;
using System.Web.Security;
//MD5Test
class Class1 {
    static void Main(string[] args) {
        string Brian = FormsAuthentication.HashPasswordForStoringInConfigFile("MyPassword", "MD5");
        Console.WriteLine(Brian);
        Brian = FormsAuthentication.HashPasswordForStoringInConfigFile("MyPassword", "sha1");
        Console.WriteLine(Brian);
    }
}