Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
VB.NET
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

      Me.enkripsib.Text = "Enkripsi"
      Me.dekripsir.Text = "Dekripsi"
  End Sub

Private Function vernamr(ByVal orig As String, ByVal key As String)
       Dim ret As String = String.Empty
       For i = 0 To orig.Length - 1
           Dim p As Char
           If key.Length - 1 > i + 1 Then p = key(i)
           ret &= Convert.ToChar(Convert.ToInt32(orig(i)) Xor Convert.ToInt32(p))
       Next
       Return ret
   End Function


What I have tried:

I wonder if this included program vernam XOR? why when I make encryption theory different from the results of this program (srry bd 3nglish)
Posted
Updated 2-Sep-16 4:34am
v2
Comments
[no name] 2-Sep-16 9:57am    
There is no real reason to repost your question over and over, if you have an actual question. Especially when you don't even bother responding to the people asking you to clarify your question.
Patrice T 2-Sep-16 10:04am    
this "I wonder if this included program vernam XOR?" is not English.
ranjhafriel mayangsari 4-Sep-16 10:49am    
ok..i want ask ,how create program VERNAM XOR in vb net 2010
enkripsi and dekripsi....
i dont know how create program in vb net this my lecture task...help me
pls

1 solution

You should learn to use the debugger as soon as possible. Rather than guessing what your code is doing, It is time to see your code executing and ensuring that it does what you expect.

The debugger allow you to follow the execution line by line, inspect variables and you will see that there is a point where it stop doing what you expect.
Debugger - Wikipedia, the free encyclopedia[^]
Mastering Debugging in Visual Studio 2010 - A Beginner's Guide[^]

The debugger is here to show you what your code is doing and your task is to compare with what it should do.
When the code don't do what is expected, you are close to a bug.

Nota: It looks like you are already good at finding bad pieces of code that you don't understand, May be it is time to start to study really.
 
Share this answer
 
v2
Comments
ranjhafriel mayangsari 4-Sep-16 10:55am    
yeah but i dont know how create program in vb net this my lecture task, please help me :,(

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900