main
juanjo 1 year ago
commit 72ce0f41f7

Binary file not shown.

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D9710F8B-8C29-48AE-B72D-A1365F2F85F8}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>_01_Seguridad</RootNamespace>
<AssemblyName>01-Seguridad</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CodeFile1.cs" />
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

@ -0,0 +1,49 @@
private void button5_Click(object sender, EventArgs e) {
string mensaje = this.textBox4.Text;
string publicKeyFile = "publicKey.xml";
string privateKeyFile = "privateKey.xml";
generarClaves(publicKeyFile, privateKeyFile);
byte[] Encriptado = encriptar(publicKeyFile, Encoding.UTF8.GetBytes(mensaje));
byte[] Desencriptado = Desencriptar(privateKeyFile, Encriptado);
this.label7.Text = BitConverter.ToString(Encriptado);
this.label8.Text = Encoding.UTF8.GetString(Desencriptado);
}
private static void generarClaves(string publicKF, string privateKF) {
using (var rsa = new RSACryptoServiceProvider(2048)) {
rsa.PersistKeyInCsp = false;
if (File.Exists(publicKF))
File.Delete(publicKF);
if (File.Exists(privateKF))
File.Delete(privateKF);
string publicKey = rsa.ToXmlString(false);
File.WriteAllText(publicKF, publicKey);
string privateKey = rsa.ToXmlString(true);
File.WriteAllText(privateKF, privateKey);
}
}
public static byte[] encriptar(string publicKF, byte[] textoPlano) {
byte[] encriptado;
using (var rsa = new RSACryptoServiceProvider(2048)) {
rsa.PersistKeyInCsp = false;
string publicKey = File.ReadAllText(publicKF);
rsa.FromXmlString(publicKey);
encriptado = rsa.Encrypt(textoPlano, true);
}
return (encriptado);
}
public static byte[] Desencriptar(string privateKF, byte[] textoEncriptado) {
byte[] Desencriptado;
using (var rsa = new RSACryptoServiceProvider(2048)) {
rsa.PersistKeyInCsp = false;
string privateKey = File.ReadAllText(privateKF);
rsa.FromXmlString(privateKey);
Desencriptado = rsa.Decrypt(textoEncriptado, true);
}
return (Desencriptado);
}

@ -0,0 +1,256 @@

namespace _01_Seguridad {
partial class Form1 {
/// <summary>
/// Variable del diseñador necesaria.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Limpiar los recursos que se estén usando.
/// </summary>
/// <param name="disposing">true si los recursos administrados se deben desechar; false en caso contrario.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Código generado por el Diseñador de Windows Forms
/// <summary>
/// Método necesario para admitir el Diseñador. No se puede modificar
/// el contenido de este método con el editor de código.
/// </summary>
private void InitializeComponent() {
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.button2 = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.button3 = new System.Windows.Forms.Button();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.button4 = new System.Windows.Forms.Button();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.button5 = new System.Windows.Forms.Button();
this.label7 = new System.Windows.Forms.Label();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(34, 23);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(109, 37);
this.button1.TabIndex = 0;
this.button1.Text = "MD5";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(175, 35);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(70, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Valor HASH: ";
//
// openFileDialog1
//
this.openFileDialog1.FileName = "openFileDialog1";
//
// button2
//
this.button2.Location = new System.Drawing.Point(34, 66);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(109, 37);
this.button2.TabIndex = 2;
this.button2.Text = "Cifrado Casero";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(290, 78);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(75, 13);
this.label2.TabIndex = 3;
this.label2.Text = "Texto cifrado: ";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(149, 75);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(135, 20);
this.textBox1.TabIndex = 4;
this.textBox1.Text = "hola cifrado casero";
//
// button3
//
this.button3.Location = new System.Drawing.Point(34, 109);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(109, 37);
this.button3.TabIndex = 5;
this.button3.Text = "DES a fichero";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(149, 118);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(135, 20);
this.textBox2.TabIndex = 7;
this.textBox2.Text = "Texto a cifrar con DES";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(290, 118);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(75, 13);
this.label3.TabIndex = 6;
this.label3.Text = "Texto cifrado: ";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(290, 133);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(92, 13);
this.label4.TabIndex = 8;
this.label4.Text = "Texto descifrado: ";
//
// button4
//
this.button4.Location = new System.Drawing.Point(34, 152);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(109, 37);
this.button4.TabIndex = 9;
this.button4.Text = "AES";
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(149, 161);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(135, 20);
this.textBox3.TabIndex = 11;
this.textBox3.Text = "Texto a cifrar con AES";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(290, 161);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(75, 13);
this.label5.TabIndex = 12;
this.label5.Text = "Texto cifrado: ";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(290, 176);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(92, 13);
this.label6.TabIndex = 13;
this.label6.Text = "Texto descifrado: ";
//
// button5
//
this.button5.Location = new System.Drawing.Point(34, 195);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(109, 37);
this.button5.TabIndex = 14;
this.button5.Text = "RSA";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(290, 204);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(75, 13);
this.label7.TabIndex = 16;
this.label7.Text = "Texto cifrado: ";
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(149, 204);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(135, 20);
this.textBox4.TabIndex = 15;
this.textBox4.Text = "Texto a cifrar con RSA";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(290, 219);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(92, 13);
this.label8.TabIndex = 17;
this.label8.Text = "Texto descifrado: ";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.label8);
this.Controls.Add(this.label7);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.button5);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.button4);
this.Controls.Add(this.label4);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.label3);
this.Controls.Add(this.button3);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label2);
this.Controls.Add(this.button2);
this.Controls.Add(this.label1);
this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label8;
}
}

@ -0,0 +1,207 @@
using System;
using System.IO;
using System.Security.Cryptography;
using System.Windows.Forms;
using System.Text;
namespace _01_Seguridad {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e) {
String nombreFichero;
if (openFileDialog1.ShowDialog() == DialogResult.OK) {
nombreFichero = openFileDialog1.FileName;
MD5 md5 = MD5.Create();
FileStream stream = File.OpenRead(nombreFichero);
byte[] hash = md5.ComputeHash(stream);
this.label1.Text += BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
}
}
private void button2_Click(object sender, EventArgs e) {
String alfabeto = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZ0123456789 ";
String alfabetoCifrado = "KLMNÑOPQRSTUVWXYZ0123456789 ABCDEFGHIJ";
String mensaje, mensajeCifrado = "";
mensaje = this.textBox1.Text;
for (int i = 0; i < mensaje.Length; i++) {
mensajeCifrado += alfabetoCifrado.Substring(alfabeto.IndexOf(mensaje.Substring(i, 1).ToUpper()), 1);
}
this.label2.Text += mensajeCifrado;
}
private void button3_Click(object sender, EventArgs e) {
try {
//al crear un objeto DES se genera la key y el vector IV
DES objDES = DES.Create();
string textoMensaje = this.textBox2.Text;
string textoCifrado, textoDescifrado;
string fichero = "encriptaDES.txt";
textoCifrado = EncryptTextToFile(textoMensaje, fichero, objDES.Key, objDES.IV);
textoDescifrado = DecryptTextFromFile(fichero, objDES.Key, objDES.IV);
this.label3.Text = textoCifrado;
this.label4.Text = textoDescifrado;
}
catch (Exception exc) {
Console.WriteLine(exc.Message);
}
}
public static string EncryptTextToFile(String Data, String FileName, byte[] Key, byte[] IV) {
try {
FileStream fStream = File.Open(FileName, FileMode.OpenOrCreate);
DES DESalg = DES.Create();
CryptoStream cStream = new CryptoStream(fStream,
DESalg.CreateEncryptor(Key, IV),
CryptoStreamMode.Write);
StreamWriter sWriter = new StreamWriter(cStream);
sWriter.WriteLine(Data);
sWriter.Close();
cStream.Close();
//fStream.Close();
fStream = File.Open(FileName, FileMode.Open);
StreamReader sr = new StreamReader(fStream);
string cifrado = sr.ReadToEnd();
fStream.Close();
return (cifrado);
}
catch (CryptographicException e) {
Console.WriteLine("Error criptográfico: {0}", e.Message);
return null;
}
catch (UnauthorizedAccessException e) {
Console.WriteLine("Error acceso a ficheros: {0}", e.Message);
return null;
}
}
public static string DecryptTextFromFile(String FileName, byte[] Key, byte[] IV) {
try {
FileStream fStream = File.Open(FileName, FileMode.Open);// .OpenOrCreate);
DES DESalg = DES.Create();
CryptoStream cStream = new CryptoStream(fStream,
DESalg.CreateDecryptor(Key, IV),
CryptoStreamMode.Read);
StreamReader sReader = new StreamReader(cStream);
string descifrado = sReader.ReadToEnd();
sReader.Close();
cStream.Close();
fStream.Close();
return descifrado;
}
catch (CryptographicException e) {
Console.WriteLine("Error criptográfico: {0}", e.Message);
return null;
}
catch (UnauthorizedAccessException e) {
Console.WriteLine("Error acceso a ficheros: {0}", e.Message);
return null;
}
}
private void button4_Click(object sender, EventArgs e) {
string original = this.textBox3.Text;
//al crear un objeto AES se genera la key y el vector IV
using (Aes myAes = Aes.Create()) {
byte[] textoEncriptado = EncryptStringToBytes_Aes(original, myAes.Key, myAes.IV);
string textoDesencriptado = DecryptStringFromBytes_Aes(textoEncriptado, myAes.Key, myAes.IV);
this.label5.Text = BitConverter.ToString(textoEncriptado);
this.label6.Text = textoDesencriptado;
}
}
static byte[] EncryptStringToBytes_Aes(string plainText, byte[] Key, byte[] IV) {
byte[] encrypted;
using (Aes aesAlg = Aes.Create()) {
aesAlg.Key = Key;
aesAlg.IV = IV;
ICryptoTransform encryptor = aesAlg.CreateEncryptor(aesAlg.Key, aesAlg.IV);
using (MemoryStream msEncrypt = new MemoryStream()) {
using (CryptoStream csEncrypt = new CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write)) {
using (StreamWriter swEncrypt = new StreamWriter(csEncrypt)) {
swEncrypt.Write(plainText);
}
encrypted = msEncrypt.ToArray();
}
}
}
return encrypted;
}
static string DecryptStringFromBytes_Aes(byte[] cipherText, byte[] Key, byte[] IV) {
string plaintext = null;
using (Aes aesAlg = Aes.Create()) {
aesAlg.Key = Key;
aesAlg.IV = IV;
ICryptoTransform decryptor = aesAlg.CreateDecryptor(aesAlg.Key, aesAlg.IV);
using (MemoryStream msDecrypt = new MemoryStream(cipherText)) {
using (CryptoStream csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read)) {
using (StreamReader srDecrypt = new StreamReader(csDecrypt)) {
plaintext = srDecrypt.ReadToEnd();
}
}
}
}
return plaintext;
}
private void button5_Click(object sender, EventArgs e) {
string mensaje = this.textBox4.Text;
string publicKeyFile = "publicKey.xml";
string privateKeyFile = "privateKey.xml";
generarClaves(publicKeyFile, privateKeyFile);
byte[] Encriptado = encriptar(publicKeyFile, Encoding.UTF8.GetBytes(mensaje));
byte[] Desencriptado = Desencriptar(privateKeyFile, Encriptado);
this.label7.Text = BitConverter.ToString(Encriptado);
this.label8.Text =Encoding.UTF8.GetString(Desencriptado);
}
private static void generarClaves(string publicKF, string privateKF) {
using (var rsa = new RSACryptoServiceProvider(2048)) {
rsa.PersistKeyInCsp = false;
if (File.Exists(publicKF))
File.Delete(publicKF);
if (File.Exists(privateKF))
File.Delete(privateKF);
string publicKey = rsa.ToXmlString(false);
File.WriteAllText(publicKF, publicKey);
string privateKey = rsa.ToXmlString(true);
File.WriteAllText(privateKF, privateKey);
}
}
public static byte[] encriptar(string publicKF, byte[] textoPlano) {
byte[] encriptado;
using (var rsa = new RSACryptoServiceProvider(2048)) {
rsa.PersistKeyInCsp = false;
string publicKey = File.ReadAllText(publicKF);
rsa.FromXmlString(publicKey);
encriptado = rsa.Encrypt(textoPlano, true);
}
return (encriptado);
}
public static byte[] Desencriptar(string privateKF, byte[] textoEncriptado) {
byte[] Desencriptado;
using (var rsa = new RSACryptoServiceProvider(2048)) {
rsa.PersistKeyInCsp = false;
string privateKey = File.ReadAllText(privateKF);
rsa.FromXmlString(privateKey);
Desencriptado = rsa.Decrypt(textoEncriptado, true);
}
return (Desencriptado);
}
}
}

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace _01_Seguridad {
static class Program {
/// <summary>
/// Punto de entrada principal para la aplicación.
/// </summary>
[STAThread]
static void Main() {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// La información general de un ensamblado se controla mediante el siguiente
// conjunto de atributos. Cambie estos valores de atributo para modificar la información
// asociada con un ensamblado.
[assembly: AssemblyTitle("01-Seguridad")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("01-Seguridad")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles
// para los componentes COM. Si es necesario obtener acceso a un tipo en este ensamblado desde
// COM, establezca el atributo ComVisible en true en este tipo.
[assembly: ComVisible(false)]
// El siguiente GUID sirve como id. de typelib si este proyecto se expone a COM.
[assembly: Guid("d9710f8b-8c29-48ae-b72d-a1365f2f85f8")]
// La información de versión de un ensamblado consta de los cuatro valores siguientes:
//
// Versión principal
// Versión secundaria
// Número de compilación
// Revisión
//
// Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión
// utilizando el carácter "*", como se muestra a continuación:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,66 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Este código fue generado por una herramienta.
// Versión de runtime: 4.0.30319.42000
//
// Los cambios de este archivo pueden provocar un comportamiento inesperado y se perderán si
// el código se vuelve a generar.
// </auto-generated>
//------------------------------------------------------------------------------
namespace _01_Seguridad.Properties {
/// <summary>
/// Clase de recurso fuertemente tipado para buscar cadenas traducidas, etc.
/// </summary>
// StronglyTypedResourceBuilder generó automáticamente esta clase
// a través de una herramienta como ResGen o Visual Studio.
// Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen
// con la opción /str o recompile su proyecto de VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Devuelve la instancia ResourceManager almacenada en caché utilizada por esta clase.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("_01_Seguridad.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Invalida la propiedad CurrentUICulture del subproceso actual para todas las
/// búsquedas de recursos usando esta clase de recursos fuertemente tipados.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace _01_Seguridad.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

@ -0,0 +1 @@
<EFBFBD>ĺTęEú@ľOŐM;¤w(.~2Ëk×U r<˘Ćj.

@ -0,0 +1 @@
<RSAKeyValue><Modulus>zH1xagPmxscjlHoIJNGcT0hh0GJE3ymoDwHqbQN8SfhNuEVMNg1p48XoezoFxI9jZLt0FjcvKBZfRr38jK4RFAEPijrO4glDwUFEfhjtuhGh0yqZc9qOyyJYk7FcK3JoeAZuGhbTLdkwhPhmJx4KURnpr1FnkYiYD8qOvg4lsHSV7nQLNmriOcAeXqOqTzvnV7xf8eV1MOsfJNJLccm3kHcOUp+3+ONY3pY9dozEo54ZOi3EY2a2xEIJyeIShWX/oQWXzbKjMdIlJ6KNFxBlAvvVVSuW73JyNlGkpXnJZRQmByQSXIimGbp8rZssMOCcd0jy9XFPaLiQgTKmhoF1RQ==</Modulus><Exponent>AQAB</Exponent><P>7WcqbzADwHaaq5vZak5EEm0eRZl/Ln5/X4zPKJzqJ8Gbxwrt/wwwQeUjXK0scTzcXrlyNwjQTr6N2a7vQe6sYax9DyESu8+oq2ajegYsxq/LBjwgHKvw2y4GGkqoauZOSM6zCbcfXQ3pdaZPPuqw+UIwk0pOfdF481yB8bKC7PM=</P><Q>3II/JTseFUN0Z4GXXalOZovJYmuegWX+B4h4exqJRGfbws52pwciRuZUM7kcVPRvMhFlrl/ekZDFn1Y9EG7tOIaQQe1e26WmIITkO8n0E0rcxzvvm0/E09CS6DztFo2WRgpnZ+vzjhD1VFElNLi5Ybbyl1wVL7FgCNqFqC9dQuc=</Q><DP>cO+4HybfUgraL7M3bbwH5CAm24NXHn4tB/6Lek2TkxAmlDzd1Ywt1Ns1xFvZnZEPYLyl2gqGVj+OabUvutTZCqos4Cqip9f07H0qXd1cJbTxR2kI+brOHOa7HnzPu/MN4NL8Fy4XbIQ2wLI6Vrr9L8bOJvOdfXtOJ6+lXZ7HbAM=</DP><DQ>kQJuODOqUt1rPW4xdnySfElNBBY1xG6oIZgTcxE+V+fc0z0nNiww1GM/2EvRX+TnAwwBzCxrl1qXO3Ng8N+hzNxhHZnWGafTmesKlG74vX8rtTGrHn3UuF6fXW5Dk+NEgYbx/ZtjLXflfa9nQkaAUswWuIbrv9Nrjib2YmXTdN0=</DQ><InverseQ>X2HUm8Oqro31pSII33day8jXMzyXGs4fDO8ejVNXfwQe6vLu8WHZiKJj9S/o/QhK0in+j3K76/OpDWkAeW0dOKhge42yETr9jyBJXcfHpjsb0pLFEfvWy1ZxK3BlFZoZWrjWMFqe8MOkGIHponsW1s+ExDc4Fnk6BXvX3Sk5mnI=</InverseQ><D>ePSWWjwWjGuMWy3XlVe7GpZY7TbDQDFWrBHZBURzhxltd1reGnbStJ0Cx6jpcnvSMepDX0SjCxY4oxKLyPbJOUjrVTs11jPetPgTOHcsXsxBKTPgcsvLfNJDDJFzUGuq6Zv8Ekh//3WhonV/jxHQzmoCdOY02buvHmAVEMwzdOxiS3UGEXaTAxDI9HbRtUKN+1/drxv3Ux7vKZo9XhXfIfxv8nmDO4Pt3/FcMuvVHPA+rYRgkXKeUqouTXyoPaJEOMkLp+MkuwwCg2/o+JeGaJWz1RDATvHPky0OD5pRB5O728psHGdMA0hirCW5MkvJr4FPu5r3sY4PG9Pc9aBC/Q==</D></RSAKeyValue>

@ -0,0 +1 @@
<RSAKeyValue><Modulus>zH1xagPmxscjlHoIJNGcT0hh0GJE3ymoDwHqbQN8SfhNuEVMNg1p48XoezoFxI9jZLt0FjcvKBZfRr38jK4RFAEPijrO4glDwUFEfhjtuhGh0yqZc9qOyyJYk7FcK3JoeAZuGhbTLdkwhPhmJx4KURnpr1FnkYiYD8qOvg4lsHSV7nQLNmriOcAeXqOqTzvnV7xf8eV1MOsfJNJLccm3kHcOUp+3+ONY3pY9dozEo54ZOi3EY2a2xEIJyeIShWX/oQWXzbKjMdIlJ6KNFxBlAvvVVSuW73JyNlGkpXnJZRQmByQSXIimGbp8rZssMOCcd0jy9XFPaLiQgTKmhoF1RQ==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31410.357
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "01-Seguridad", "01-Seguridad\01-Seguridad.csproj", "{D9710F8B-8C29-48AE-B72D-A1365F2F85F8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D9710F8B-8C29-48AE-B72D-A1365F2F85F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D9710F8B-8C29-48AE-B72D-A1365F2F85F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D9710F8B-8C29-48AE-B72D-A1365F2F85F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D9710F8B-8C29-48AE-B72D-A1365F2F85F8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7BAFB6F9-0F53-48AD-AE96-DD2845C1EB4A}
EndGlobalSection
EndGlobal
Loading…
Cancel
Save

Powered by Informatica FP.