Click here to Skip to main content
15,076,465 members

Comments by Nicky Ralph (Top 11 by date)

Nicky Ralph 13-Mar-21 15:48pm View
I've tried the link above, however i cant decrypt data without getting from encrypted string.
Nicky Ralph 13-Mar-21 3:55am View
Thank you for this Richars, this is really helpful. Maybe you can help me as welll with
Nicky Ralph 11-Mar-21 7:45am View
I did this:
Dim HexArray as Byte() = New byte() { }
how can i get the value of textbox1.text using this

Nicky Ralph 11-Mar-21 7:16am View
This is what I did

Imports System.IO
Imports System.Text
Imports System.Security.Cryptography

Public Class Form1
    Shared Function HexStringToBytes1(ByVal hexString As String) As Byte()
        Dim result As New List(Of Byte)()
        For i As Integer = 0 To hexString.Length - 1 Step 3
            result.Add(Convert.ToByte(hexString.Substring(i, 2), 16))
        Return result.ToArray()
    End Function

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        RichTextBox1.Text = HexStringToBytes(TextBox1.Text)
    End Sub
End Class
Nicky Ralph 11-Mar-21 7:14am View
Thank you, I'll try it again, I'll update you.
Nicky Ralph 11-Mar-21 7:08am View
YES, I want to convert string into byte array with same value of hex. something like this, Inside the textbox1.text is a HEX VALUE

TEXTBOX1.TEXT = "A1-B2-C3-D4-E5"

I want to convert it into byte like

byte() ={&HA1, &HB2, &HC3, &HD4, &hE5}
Nicky Ralph 11-Mar-21 7:02am View
this is what I want to do

Inside the textbox1.text ="01-23-45-67-89"

I want to convert the string inside the textbox1.text into Byte array
<div class="pre-action-link" id="premain99971"><span id="copycode99971" onclick="return ProcessCodeBlocks.copyCode(99971);">Copy Code</span></div>&H01, &H23, &H45, &H67, &H89
Nicky Ralph 11-Mar-21 6:47am View
I tried to use the code above and get the value of textbox1 to show it on Richtext1, I got and error " dimensional array of Byte cannot be converted to string"
Private Sub Button1_Click(
        'RichTextBox1.Text = HexStringToBytes(TextBox1.Text)
End Sub
Nicky Ralph 9-Mar-21 22:24pm View
CryptoStreamMode.Read), stream....
this is the error message showing
"Specified key is not a valid size for this algorithm."
Nicky Ralph 9-Mar-21 21:35pm View
i have a problem in this line: tr = New StreamReader(CType(New CryptoStream(CType(New MemoryStream(Encoding.[Default].GetBytes(s)), Stream), objCryptoProvider.CreateDecryptor(bytes1, bytes2), CryptoStreamMode.Read), Stream)).ReadToEnd()
Nicky Ralph 9-Mar-21 19:14pm View
kindly refer to this website pls
Input type: Text
Input text: ED02C5EDBCE71B35DB37CB403EBB47E8 (hex)
Function: AES
Mode: ECD
Key: 31323334353637387174617246523458
Decrypt Output: 38413046323935314437380000000000

THAT should be the correct output.