Created
September 28, 2014 12:04
-
-
Save Fhernd/abb89ea666836e49d5a5 to your computer and use it in GitHub Desktop.
Clase de prueba para encriptación.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Articulos.Pregunta.P1120 | |
{ | |
public sealed class PruebaEncriptacion | |
{ | |
public static void Main() | |
{ | |
string textoPlano = "OrtizOL - Experiencias Construcción Software (xCSw)"; | |
string contrasegnia = "C0ntr@s3n1@"; | |
Console.WriteLine (Environment.NewLine); | |
Console.WriteLine(textoPlano); | |
Console.WriteLine(); | |
// Creación de instancia de `DESEncrypt` para encriptar y desencriptar | |
// desde texto plano hacia texto plano: | |
DESEncrypt cripto = new DESEncrypt(); | |
string textoEncriptado = cripto.EncriptarCadenaDeCaracteres(textoPlano, contrasegnia); | |
Console.WriteLine("****** Texto Encriptado ******"); | |
Console.WriteLine(textoEncriptado); | |
Console.WriteLine(); | |
Console.WriteLine("****** Texto Desencriptado ******"); | |
string textoDesencriptado = cripto.DesencriptarCadenaDeCaracteres(textoEncriptado, contrasegnia); | |
Console.WriteLine(textoDesencriptado); | |
Console.WriteLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment