using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using ESpace.DALibrary;
/// <summary>
/// 该文件由51aspx创建，转载请保留
/// </summary>
public partial class test : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    /// <summary>
    /// 加密
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Button1_Click(object sender, EventArgs e)
    {
        //base.EncryptMethod = Alogrim.SymmProvEnum.TripleDES;
        //    base.Key = "123";
        //    base.IV = "abc";

        Alogrim test = new Alogrim(Alogrim.SymmProvEnum.DES);
        test.Key = "1234";
        test.IV = "1234";

        lblResult.Text = test.Encrypting(TextBox1.Text);
    }

    /// <summary>
    /// 解密
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Button2_Click(object sender, EventArgs e)
    {
        Alogrim test = new Alogrim(Alogrim.SymmProvEnum.DES);
        test.Key = "123";
        test.IV = "abc";

        lblResult.Text = test.Encrypting(TextBox1.Text);
    }
}
