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é.
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.
![[VB] - BASE64 ENCODE OR DECODE [VB] - 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)
mọi người cùng nhau nhắn tin mã hóa nhé <3 hihi
ReplyDeleteMÌNH ĐÃ CẬP NHẬT THÊM TÍCH NĂNG VÀO CHƯƠNG TRÌNH RỒI NHÉ MỌI NGƯỜI :d, MỌI NGƯỜI TEST LỖI XEM THẾ NÀO RỒI BÁO LẠI MÌNH SỚM NHÉ TKS ALL <3
ReplyDeletephát hành ứng dụng này làm gì e? nó có giúp ích gì nhiều đâu? hóng e viết bài chia sẽ bài viết cách thức đào bitcoin và cách để bán những đồng tiền điện tử đó để tăng thu nhập cho người chưa biết ấy :D
ReplyDeletephát hành chương trình này nhưng chưa tích hợp thêm chat messenger vào để khi gửi tin cho người thân thì mình chuyển sang tab để mã hóa đoạn text để gửi bí mật ấy, bên kia cũng sữ dụng chương trình này để dích ngược lại đoạn text để ẩn danh đoạn chát :D
DeleteAPP NÀY ĐỂ LÀM GÌ E?
ReplyDeletemã hóa đoạn text đó a, nó chỉ mặc đình được 86 ký tự thôi a nhé :D
Deletesữ dụng onl web cho tiện chứ tải tools gì cho mất công :D (nếu tùy biến đc mã hóa code mới thì ok e nhé (y))
ReplyDelete