
09/03/2014, 22:10
|
| | Fecha de Ingreso: mayo-2007 Ubicación: PIC-16F84A
Mensajes: 729
Antigüedad: 17 años, 8 meses Puntos: 8 | |
Respuesta: Pasar esta fórmula matemática Me funciona así:
Código:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ZyXEL
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button_Generar_Click(object sender, EventArgs e)
{
try
{
textBox_Password.Text = Calculo_Password(textBox_seedNumber.Text);
}
catch (Exception ex)
{
MessageBox.Show("Los números deben ser de 12 cifras hexadeximales [0-9, A-F, a-f]", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private string Calculo_Password(string seedNumber)
{
int num = Convert.ToInt32(seedNumber.Substring(0, 6), 0x10);
int num2 = num + 0x10f0a563;
int num3 = Convert.ToInt32(seedNumber.Substring(10, 2), 0x10) & 7;
int num4 = (num2 >> num3) | (num2 << (0x20 - num3));
num4 ^= num;
return num4.ToString("X");
}
}
}
Gracias.
__________________ Meta Shell, VERSIÓN 1.2.2 Descargar |