예제 #1
0
        private void btnCheck_Click(object sender, EventArgs e)
        {
            string hint = Crypto.Decrypt(Crypto.getRegistry("KeyName"), Crypto.getSerialMB());

            if (string.Equals(hint, Crypto.getSerialPC()))
            {
                MessageBox.Show("OK");
            }
            else
            {
                MessageBox.Show("NO");
            }
        }
예제 #2
0
 private void btnGenKey_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(ShopMS.Properties.Settings.Default.serialMB))
     {
         ShopMS.Properties.Settings.Default.serialMB = Crypto.getSerialMB();
     }
     if (string.Equals(ShopMS.Properties.Settings.Default.serialMB, Crypto.getSerialMB()))
     {
         string password = Crypto.getSerialMB();
         string hint     = Crypto.getSerialPC();
         txtGenKey.Text = Crypto.Encrypt(hint, password);
     }
     else
     {
         MessageBox.Show("Expired!");
     }
 }