魅影醉
Thứ Ba, 6 tháng 9, 2016
Thứ Sáu, 2 tháng 9, 2016
E807F1FCF82D132F9BB018CA6738A19F
C#:
textBox2.Text = md5(textBox1.Text);
Code:
public static byte[] encryptData(string data)
{
System.Security.Cryptography.MD5CryptoServiceProvider md5Hasher = new System.Security.Cryptography.MD5CryptoServiceProvider();
byte[] hashedBytes;
System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding();
hashedBytes = md5Hasher.ComputeHash(encoder.GetBytes(data));
return hashedBytes;
}
public static string md5(string data)
{
return BitConverter.ToString(encryptData(data)).Replace("-","").ToLower();
}
VB:
TextBox2.Text = md5(TextBox1.Text)
Code:
Public Shared Function encryptData(data As String) As Byte()
Dim md5Hasher As New System.Security.Cryptography.MD5CryptoServiceProvider()
Dim hashedBytes As Byte()
Dim encoder As New System.Text.UTF8Encoding()
hashedBytes = md5Hasher.ComputeHash(encoder.GetBytes(data))
Return hashedBytes
End Function
Public Shared Function md5(data As String) As String
Return BitConverter.ToString(encryptData(data)).Replace("-","").ToLower()
End Function
ToLower()
ToUpper()
md5("1234567890")
ToLower() : e807f1fcf82d132f9bb018ca6738a19f
ToUpper() : E807F1FCF82D132F9BB018CA6738A19F
textBox2.Text = md5(textBox1.Text);
Code:
public static byte[] encryptData(string data)
{
System.Security.Cryptography.MD5CryptoServiceProvider md5Hasher = new System.Security.Cryptography.MD5CryptoServiceProvider();
byte[] hashedBytes;
System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding();
hashedBytes = md5Hasher.ComputeHash(encoder.GetBytes(data));
return hashedBytes;
}
public static string md5(string data)
{
return BitConverter.ToString(encryptData(data)).Replace("-","").ToLower();
}
VB:
TextBox2.Text = md5(TextBox1.Text)
Code:
Public Shared Function encryptData(data As String) As Byte()
Dim md5Hasher As New System.Security.Cryptography.MD5CryptoServiceProvider()
Dim hashedBytes As Byte()
Dim encoder As New System.Text.UTF8Encoding()
hashedBytes = md5Hasher.ComputeHash(encoder.GetBytes(data))
Return hashedBytes
End Function
Public Shared Function md5(data As String) As String
Return BitConverter.ToString(encryptData(data)).Replace("-","").ToLower()
End Function
ToLower()
ToUpper()
md5("1234567890")
ToLower() : e807f1fcf82d132f9bb018ca6738a19f
ToUpper() : E807F1FCF82D132F9BB018CA6738A19F
D41D8CD98F00B204E9800998ECF8427E
Imports System.IO
Imports System.Security
Imports System.Security.Cryptography
Public Class Form1
Function md5_hash(ByVal file_name As String)
Return hash_generator("md5", file_name)
End Function
Function sha_1(ByVal file_name As String)
Return hash_generator("sha1", file_name)
End Function
Function sha_256(ByVal file_name As String)
Return hash_generator("sha256", file_name)
End Function
Function hash_generator(ByVal hash_type As String, ByVal file_name As String)
Dim hash
If hash_type.ToLower = "md5" Then
hash = MD5.Create
ElseIf hash_type.ToLower = "sha1" Then
hash = SHA1.Create()
ElseIf hash_type.ToLower = "sha256" Then
hash = SHA256.Create()
Else
MsgBox("Type de hash inconnu : " & hash_type, MsgBoxStyle.Critical)
Return False
End If
Dim hashValue() As Byte
Dim fileStream As FileStream = File.OpenRead(file_name)
fileStream.Position = 0
hashValue = hash.ComputeHash(fileStream)
Dim hash_hex = PrintByteArray(hashValue)
fileStream.Close()
Return hash_hex
End Function
Public Function PrintByteArray(ByVal array() As Byte)
Dim hex_value As String = ""
Dim i As Integer
For i = 0 To array.Length - 1
hex_value += array(i).ToString("X2")
Next i
Return hex_value
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim path As String = OpenFileDialog1.FileName
TextBox1.Text = path
TextBox2.Text = md5_hash(path)
TextBox3.Text = sha_1(path)
TextBox4.Text = sha_256(path)
End If
End Sub
End Class
d41d8cd98f00b204e9800998ecf8427e
D41D8CD98F00B204E9800998ECF8427E
da39a3ee5e6b4b0d3255bfef95601890afd80709
DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
Imports System.Security
Imports System.Security.Cryptography
Public Class Form1
Function md5_hash(ByVal file_name As String)
Return hash_generator("md5", file_name)
End Function
Function sha_1(ByVal file_name As String)
Return hash_generator("sha1", file_name)
End Function
Function sha_256(ByVal file_name As String)
Return hash_generator("sha256", file_name)
End Function
Function hash_generator(ByVal hash_type As String, ByVal file_name As String)
Dim hash
If hash_type.ToLower = "md5" Then
hash = MD5.Create
ElseIf hash_type.ToLower = "sha1" Then
hash = SHA1.Create()
ElseIf hash_type.ToLower = "sha256" Then
hash = SHA256.Create()
Else
MsgBox("Type de hash inconnu : " & hash_type, MsgBoxStyle.Critical)
Return False
End If
Dim hashValue() As Byte
Dim fileStream As FileStream = File.OpenRead(file_name)
fileStream.Position = 0
hashValue = hash.ComputeHash(fileStream)
Dim hash_hex = PrintByteArray(hashValue)
fileStream.Close()
Return hash_hex
End Function
Public Function PrintByteArray(ByVal array() As Byte)
Dim hex_value As String = ""
Dim i As Integer
For i = 0 To array.Length - 1
hex_value += array(i).ToString("X2")
Next i
Return hex_value
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim path As String = OpenFileDialog1.FileName
TextBox1.Text = path
TextBox2.Text = md5_hash(path)
TextBox3.Text = sha_1(path)
TextBox4.Text = sha_256(path)
End If
End Sub
End Class
d41d8cd98f00b204e9800998ecf8427e
D41D8CD98F00B204E9800998ECF8427E
da39a3ee5e6b4b0d3255bfef95601890afd80709
DA39A3EE5E6B4B0D3255BFEF95601890AFD80709
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855
6.3.9600.16384
Windows\Boot
Windows\Resources
System32\catroot
System32\CodeIntegrity
actxprxy.dll
d3d11.dll
dcomp.dll
dxgi.dll
ExplorerFrame.dll
msoert2.dll
shellstyle.dll
twinapi.dll
Windows\WinSxS\Manifests
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_5.82.0.0_en-us_520b270cf8d1ce1e.manifest
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_5.82.9600.16384_en-us_9261114bd6b271dd.manifest
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_6.0.0.0_en-us_4a6c69a218e5ba29.manifest
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_6.0.9600.16384_en-us_bfffdf382dd97ff6.manifest
x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9600.16384_none_7c55c866aa0c3ff0.manifest
x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.16384_none_a9f4965301334e09.manifest
x86_microsoft.windows.gdiplus.systemcopy_31bf3856ad364e35_6.3.9600.16384_none_7b7a5b0c11a7193c.manifest
x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.9600.16384_none_eb8e1a53c2bfee30.manifest
x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.9600.16384_none_dadf89385bc5c7d7.manifest
x86_microsoft.windows.i..utomation.proxystub_6595b64144ccf1df_1.0.9600.16384_none_04f797068e86c445.manifest
x86_microsoft.windows.isolationautomation_6595b64144ccf1df_1.0.0.0_none_35d357a66c38ade4.manifest
x86_microsoft.windows.systemcompatible_6595b64144ccf1df_6.0.9600.16384_none_b190d936bdca3c10.manifest
Windows\WinSxS
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_5.82.9600.16384_en-us_9261114bd6b271dd
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_6.0.9600.16384_en-us_bfffdf382dd97ff6
x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9600.16384_none_7c55c866aa0c3ff0
x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.16384_none_a9f4965301334e09
x86_microsoft.windows.gdiplus.systemcopy_31bf3856ad364e35_6.3.9600.16384_none_7b7a5b0c11a7193c
x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.9600.16384_none_eb8e1a53c2bfee30
x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.9600.16384_none_dadf89385bc5c7d7
x86_microsoft.windows.i..utomation.proxystub_6595b64144ccf1df_1.0.9600.16384_none_04f797068e86c445
x86_microsoft.windows.isolationautomation_6595b64144ccf1df_1.0.0.0_none_35d357a66c38ade4
Windows\Resources
System32\catroot
System32\CodeIntegrity
actxprxy.dll
d3d11.dll
dcomp.dll
dxgi.dll
ExplorerFrame.dll
msoert2.dll
shellstyle.dll
twinapi.dll
Windows\WinSxS\Manifests
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_5.82.0.0_en-us_520b270cf8d1ce1e.manifest
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_5.82.9600.16384_en-us_9261114bd6b271dd.manifest
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_6.0.0.0_en-us_4a6c69a218e5ba29.manifest
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_6.0.9600.16384_en-us_bfffdf382dd97ff6.manifest
x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9600.16384_none_7c55c866aa0c3ff0.manifest
x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.16384_none_a9f4965301334e09.manifest
x86_microsoft.windows.gdiplus.systemcopy_31bf3856ad364e35_6.3.9600.16384_none_7b7a5b0c11a7193c.manifest
x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.9600.16384_none_eb8e1a53c2bfee30.manifest
x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.9600.16384_none_dadf89385bc5c7d7.manifest
x86_microsoft.windows.i..utomation.proxystub_6595b64144ccf1df_1.0.9600.16384_none_04f797068e86c445.manifest
x86_microsoft.windows.isolationautomation_6595b64144ccf1df_1.0.0.0_none_35d357a66c38ade4.manifest
x86_microsoft.windows.systemcompatible_6595b64144ccf1df_6.0.9600.16384_none_b190d936bdca3c10.manifest
Windows\WinSxS
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_5.82.9600.16384_en-us_9261114bd6b271dd
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_6.0.9600.16384_en-us_bfffdf382dd97ff6
x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9600.16384_none_7c55c866aa0c3ff0
x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.16384_none_a9f4965301334e09
x86_microsoft.windows.gdiplus.systemcopy_31bf3856ad364e35_6.3.9600.16384_none_7b7a5b0c11a7193c
x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.9600.16384_none_eb8e1a53c2bfee30
x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.9600.16384_none_dadf89385bc5c7d7
x86_microsoft.windows.i..utomation.proxystub_6595b64144ccf1df_1.0.9600.16384_none_04f797068e86c445
x86_microsoft.windows.isolationautomation_6595b64144ccf1df_1.0.0.0_none_35d357a66c38ade4
Version 1607 (OS Build 14393.0)
MrmCoreR.dll
SettingSyncCore.dll
twinapi.appcore.dll
explorer.exe - Application Error
The instruction at 0x002C7EEF referenced at 0x00000000. The memory could not be read.
Click on OK to teminate the program
explorer.exe
The server process could not be started because the configured identity is incorrect. Check the username and password.
windows\winsxs\manifests
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_5.82.14393.0_en-us_9f0a3da78ce02d12.manifest
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_6.0.14393.0_en-us_8ac7d0b8fed3ccab.manifest
x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.14393.0_none_88fef4c26039fb25.manifest
x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.14393.0_none_74bc87d3d22d9abe.manifest
x86_microsoft.windows.gdiplus.systemcopy_31bf3856ad364e35_10.0.14393.0_none_b830667c5462b72f.manifest
x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.14393.0_none_0532880d4cbfdd3f.manifest
x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.14393.0_none_f483f6f1e5c5b6e6.manifest
x86_microsoft.windows.i..utomation.proxystub_6595b64144ccf1df_1.0.14393.0_none_1e9c04c01886b354.manifest
x86_microsoft.windows.isolationautomation_6595b64144ccf1df_1.0.14393.0_none_7524b38cb97c9940.manifest
x86_microsoft.windows.systemcompatible_6595b64144ccf1df_6.0.14393.0_none_7c58cab78ec488c5.manifest
windows\winsxs
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_5.82.14393.0_en-us_9f0a3da78ce02d12
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_6.0.14393.0_en-us_8ac7d0b8fed3ccab
x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.14393.0_none_88fef4c26039fb25
x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.14393.0_none_74bc87d3d22d9abe
x86_microsoft.windows.gdiplus.systemcopy_31bf3856ad364e35_10.0.14393.0_none_b830667c5462b72f
x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.14393.0_none_0532880d4cbfdd3f
x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.14393.0_none_f483f6f1e5c5b6e6
x86_microsoft.windows.i..utomation.proxystub_6595b64144ccf1df_1.0.14393.0_none_1e9c04c01886b354
x86_microsoft.windows.isolationautomation_6595b64144ccf1df_1.0.14393.0_none_7524b38cb97c9940
SettingSyncCore.dll
twinapi.appcore.dll
explorer.exe - Application Error
The instruction at 0x002C7EEF referenced at 0x00000000. The memory could not be read.
Click on OK to teminate the program
explorer.exe
The server process could not be started because the configured identity is incorrect. Check the username and password.
windows\winsxs\manifests
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_5.82.14393.0_en-us_9f0a3da78ce02d12.manifest
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_6.0.14393.0_en-us_8ac7d0b8fed3ccab.manifest
x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.14393.0_none_88fef4c26039fb25.manifest
x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.14393.0_none_74bc87d3d22d9abe.manifest
x86_microsoft.windows.gdiplus.systemcopy_31bf3856ad364e35_10.0.14393.0_none_b830667c5462b72f.manifest
x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.14393.0_none_0532880d4cbfdd3f.manifest
x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.14393.0_none_f483f6f1e5c5b6e6.manifest
x86_microsoft.windows.i..utomation.proxystub_6595b64144ccf1df_1.0.14393.0_none_1e9c04c01886b354.manifest
x86_microsoft.windows.isolationautomation_6595b64144ccf1df_1.0.14393.0_none_7524b38cb97c9940.manifest
x86_microsoft.windows.systemcompatible_6595b64144ccf1df_6.0.14393.0_none_7c58cab78ec488c5.manifest
windows\winsxs
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_5.82.14393.0_en-us_9f0a3da78ce02d12
x86_microsoft.windows.c..-controls.resources_6595b64144ccf1df_6.0.14393.0_en-us_8ac7d0b8fed3ccab
x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.14393.0_none_88fef4c26039fb25
x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.14393.0_none_74bc87d3d22d9abe
x86_microsoft.windows.gdiplus.systemcopy_31bf3856ad364e35_10.0.14393.0_none_b830667c5462b72f
x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.14393.0_none_0532880d4cbfdd3f
x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.14393.0_none_f483f6f1e5c5b6e6
x86_microsoft.windows.i..utomation.proxystub_6595b64144ccf1df_1.0.14393.0_none_1e9c04c01886b354
x86_microsoft.windows.isolationautomation_6595b64144ccf1df_1.0.14393.0_none_7524b38cb97c9940
Đăng ký:
Bài đăng (Atom)