Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Mensajes - noxonsoftwares

#481
yo tengo el ollydbg en mi win 7 solo soluciona ese problema dando click derecho, propiedades, compatibilidad ( Win XP SP3) y problema solucionado
#482
Estimados colegas del foro tengo una pregunta si alguien puede ayudarme, es que me resulta dificil ya que con winsock me era mas facil hacer las tareas jeje.

Lo que necesitaria es saber como puedo hacer un cliente servidor usando netsocket porque no tengo idea , busque  y busque por la web pero ninguno me funciona como quiero (usando mi cuenta de No-IP como lo hacia con winsock) ¿El porque les pido esto? pues porque win7 no trabaja con winsock.dll y la verdad es que ahora para ser francos todos usan o la mayoria usa win7 el cual esta mas apto para NetSockes.

si alguien fuera tan amable de ayudarme le estare agradecido.
#483
C# - VB.NET / Re:[VB2010] Algoritmo encryptacion AES
Octubre 01, 2012, 12:34:31 PM
De nada @Zorro dejame que busco tambien existe un programa de escritorio que te permite hacer lo mismo que la pagina pero ahora no recuerdo donde lo tenia ni como se llama  :-[
#484
C# - VB.NET / Re:[VB2010] Algoritmo encryptacion AES
Septiembre 30, 2012, 03:33:21 PM
El codigo en C# seria el siguiente:


Código: php
//Encriptacion en AES con contraseña para poder ver lo encritado
//Se encripta y se le asigna una contraseña para poder ver el texto desencriptado
//Para desencriptar pide que se ingrese la contraseña, si esta es incorrecta no muestra nada.

public string AES_Encrypt(string input, string pass)
{
System.Security.Cryptography.RijndaelManaged AES = new System.Security.Cryptography.RijndaelManaged();
System.Security.Cryptography.MD5CryptoServiceProvider Hash_AES = new System.Security.Cryptography.MD5CryptoServiceProvider();
string encrypted = "";
try {
byte[] hash = new byte[32];
byte[] temp = Hash_AES.ComputeHash(System.Text.ASCIIEncoding.ASCII.GetBytes(pass));
Array.Copy(temp, 0, hash, 0, 16);
Array.Copy(temp, 0, hash, 15, 16);
AES.Key = hash;
AES.Mode = System.Security.Cryptography.CipherMode.ECB;
System.Security.Cryptography.ICryptoTransform DESEncrypter = AES.CreateEncryptor();
byte[] Buffer = System.Text.ASCIIEncoding.ASCII.GetBytes(input);
encrypted = Convert.ToBase64String(DESEncrypter.TransformFinalBlock(Buffer, 0, Buffer.Length));
return encrypted;
} catch (Exception ex) {
}
}

public string AES_Decrypt(string input, string pass)
{
System.Security.Cryptography.RijndaelManaged AES = new System.Security.Cryptography.RijndaelManaged();
System.Security.Cryptography.MD5CryptoServiceProvider Hash_AES = new System.Security.Cryptography.MD5CryptoServiceProvider();
string decrypted = "";
try {
byte[] hash = new byte[32];
byte[] temp = Hash_AES.ComputeHash(System.Text.ASCIIEncoding.ASCII.GetBytes(pass));
Array.Copy(temp, 0, hash, 0, 16);
Array.Copy(temp, 0, hash, 15, 16);
AES.Key = hash;
AES.Mode = System.Security.Cryptography.CipherMode.ECB;
System.Security.Cryptography.ICryptoTransform DESDecrypter = AES.CreateDecryptor();
byte[] Buffer = Convert.FromBase64String(input);
decrypted = System.Text.ASCIIEncoding.ASCII.GetString(DESDecrypter.TransformFinalBlock(Buffer, 0, Buffer.Length));
return decrypted;
} catch (Exception ex) {
}
}


Un saludo y mira en esta pagina puedes convertir de VB a C# o viceversa   No tienes permitido ver los links. Registrarse o Entrar a mi cuenta
#485
C# - VB.NET / [VB2010] Algoritmo encryptacion AES
Septiembre 29, 2012, 06:59:13 PM
Bueno como mi primer aporte les traigo este algoritmo de encriptacion AES el cual funciona de la siguiente manera:

Para encriptar es necesario introducir una contraseña, la cual servira posteriormente para desencriptar lo que esta encriptado (facil no? )

Bueno sin mas vueltas aqui el algoritmo.

Código: vbnet
'Encriptacion en AES con contraseña para poder ver lo encritado
    'Se encripta y se le asigna una contraseña para poder ver el texto desencriptado
    'Para desencriptar pide que se ingrese la contraseña, si esta es incorrecta no muestra nada.

    Public Function AES_Encrypt(ByVal input As String, ByVal pass As String) As String
        Dim AES As New System.Security.Cryptography.RijndaelManaged
        Dim Hash_AES As New System.Security.Cryptography.MD5CryptoServiceProvider
        Dim encrypted As String = ""
        Try
            Dim hash(31) As Byte
            Dim temp As Byte() = Hash_AES.ComputeHash(System.Text.ASCIIEncoding.ASCII.GetBytes(pass))
            Array.Copy(temp, 0, hash, 0, 16)
            Array.Copy(temp, 0, hash, 15, 16)
            AES.Key = hash
            AES.Mode = Security.Cryptography.CipherMode.ECB
            Dim DESEncrypter As System.Security.Cryptography.ICryptoTransform = AES.CreateEncryptor
            Dim Buffer As Byte() = System.Text.ASCIIEncoding.ASCII.GetBytes(input)
            encrypted = Convert.ToBase64String(DESEncrypter.TransformFinalBlock(Buffer, 0, Buffer.Length))
            Return encrypted
        Catch ex As Exception
        End Try
    End Function

    Public Function AES_Decrypt(ByVal input As String, ByVal pass As String) As String
        Dim AES As New System.Security.Cryptography.RijndaelManaged
        Dim Hash_AES As New System.Security.Cryptography.MD5CryptoServiceProvider
        Dim decrypted As String = ""
        Try
            Dim hash(31) As Byte
            Dim temp As Byte() = Hash_AES.ComputeHash(System.Text.ASCIIEncoding.ASCII.GetBytes(pass))
            Array.Copy(temp, 0, hash, 0, 16)
            Array.Copy(temp, 0, hash, 15, 16)
            AES.Key = hash
            AES.Mode = Security.Cryptography.CipherMode.ECB
            Dim DESDecrypter As System.Security.Cryptography.ICryptoTransform = AES.CreateDecryptor
            Dim Buffer As Byte() = Convert.FromBase64String(input)
            decrypted = System.Text.ASCIIEncoding.ASCII.GetString(DESDecrypter.TransformFinalBlock(Buffer, 0, Buffer.Length))
            Return decrypted
        Catch ex As Exception
        End Try
    End Function



Ejemplo de uso con dos buttons y dos textbox

Código: vbnet
 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox2.Text = AES_Encrypt(TextBox1.Text, InputBox("ingrese la contraseña"))
    End Sub



    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox1.Text = AES_Decrypt(TextBox2.Text, InputBox("ingrese la contraseña"))
    End Sub