Bên dưới là hình ảnh mình viết ra để phục vụ cho mục đích trên.
FULL CODE :
Imports System.Net
Imports System.IO
Imports System.Net.Mail
Imports System.Threading
Imports System.Security.Cryptography
Imports System.Text
Public Class Form1
#Region "PANEL MOVING"
Dim drag As Boolean
Dim mousex As Integer
Dim mousey As Integer
Private Sub Panel2_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs)
drag = True
mousex = Windows.Forms.Cursor.Position.X - Me.Left
mousey = Windows.Forms.Cursor.Position.Y - Me.Top
End Sub
Private Sub Panel2_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs)
If drag Then
Me.Top = Windows.Forms.Cursor.Position.Y - mousey
Me.Left = Windows.Forms.Cursor.Position.X - mousex
End If
End Sub
Private Sub Panel1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Panel1.MouseDown
drag = True
mousex = Windows.Forms.Cursor.Position.X - Me.Left
mousey = Windows.Forms.Cursor.Position.Y - Me.Top
End Sub
Private Sub Panel1_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Panel1.MouseMove
If drag Then
Me.Top = Windows.Forms.Cursor.Position.Y - mousey
Me.Left = Windows.Forms.Cursor.Position.X - mousex
End If
End Sub
Private Sub Panel2_MouseUp(ByVal sender As Object, ByVal e As MouseEventArgs)
drag = False
End Sub
Private Sub Panel1_MouseUp(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Panel1.MouseUp
drag = False
End Sub
Dim textbytes, encryptedtextbytes As Byte()
Dim rsa As New RSACryptoServiceProvider
Dim encoder As New UTF8Encoding
Dim encrypted, TextToDecrypt, TextToEncrypt, decrypted As String
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Try
TextToEncrypt = TextBox1.Text
encrypt()
TextBox2.Text = encrypted
' TextBox2.Enabled = True
Button3.Enabled = True
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Try
TextToDecrypt = TextBox1.Text
decrypt()
TextBox2.Text = decrypted
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
#End Region
Sub encrypt()
'Use UTF8 to convert the text string into a byte array
textbytes = encoder.GetBytes(TextToEncrypt)
'encrypt the text
encryptedtextbytes = rsa.Encrypt(textbytes, True)
'Convert the encrypted byte array into a Base64 string for display purposes
encrypted = Convert.ToBase64String(encryptedtextbytes)
End Sub
Sub decrypt()
encryptedtextbytes = Convert.FromBase64String(TextToDecrypt)
'get the decrypted clear text byte array
textbytes = rsa.Decrypt(encryptedtextbytes, True)
'convert the byte array to text using the same encoding format that was used for encryption
decrypted = encoder.GetString(textbytes)
End Sub
Private Sub Label3_Click(sender As Object, e As EventArgs) Handles Label3.Click
End
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
My.Computer.Clipboard.SetText(TextBox2.Text)
Label4.Text = "Copy Successfull"
End Sub
End Class
Trong đoạn code trên mình có tích hợp thêm mã code FLAT UI để làm đẹp cho giao diện nhé mọi người, nếu ai không thích thì có thể loại bỏ code đó ra để tối ưu thủ thuật này thật tốt nhé.
DOWNLOAD PROJECT
DOWNLOAD FULL CODE + DEMO
MẬT KHẨU GIẢI NÉN: hungqb.com
Chúc mọi người thành công với thủ thuật đơn giản này.
![[.NET] BASE64 ENCODE OR DECODE [.NET] BASE64 ENCODE OR DECODE](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQfvP66qM5WlAWOXLDcxjwWCg5FMjW5g_wrmsDkgR6C-pYzVm0KUr0phDE1yIpT9j5Ib4S5eesdWzby7A0_Ovc_UB3NxulxaZ-_x7IJ68FdUV1LpgMwsUwg21u8x5-qJrSXGe6Y___i8BIIgjgSsDlobl_UH_HhRrsGYGlN7163ufpjXjcLXaLDg-bJZk/w640-h346/TOOLS-ENCODE-DECODE-BASE64.png)

Comments
nice app
ReplyDeleteBlog chuyển nhượng quản lý rồi nhé mọi người :D
Deletechuyển cho ai vậy e???
DeleteHùng nó bán blog r` đó ô, và chuyển nhượng lại blog cho 1 lão code trong nhóm của nó, mà chủ yếu nó kiếm lượt search google để làm gì k biết, chứ dạo này thấy nó cày backlink hơi bị gắt haha, làm ngó tiến bộ lắm, nhưng search từ khóa thì chưa ổn lắm, vì domain này có chút dính dáng nên nó giữ lại đấy, không nó chuyển tên miền khác luôn r` !
DeleteThere are many encrypted websites, so there's no need to bother with a program like this.
ReplyDeleteyes. i learning code <3
Deletehi fr, i'm learn code, and how to project settings ...v.v bla bla hehe tks support
Delete