Click here to Skip to main content
15,891,943 members
Home / Discussions / C#
   

C#

 
AnswerRe: Thread and Webbrowser Control- Want to Create webbrowser on the fly(runtime) Pin
Dave Kreskowiak15-Sep-10 2:16
mveDave Kreskowiak15-Sep-10 2:16 
AnswerRe: Thread and Webbrowser Control- Want to Create webbrowser on the fly(runtime) Pin
Pete O'Hanlon15-Sep-10 3:45
mvePete O'Hanlon15-Sep-10 3:45 
Questionc# Pin
solanki12314-Sep-10 20:03
solanki12314-Sep-10 20:03 
AnswerRe: c# Pin
Dave Kreskowiak14-Sep-10 20:04
mveDave Kreskowiak14-Sep-10 20:04 
AnswerRe: c# Pin
Abhinav S14-Sep-10 20:24
Abhinav S14-Sep-10 20:24 
AnswerRe: c# Pin
Dave Kreskowiak15-Sep-10 2:12
mveDave Kreskowiak15-Sep-10 2:12 
AnswerRe: c# Pin
PIEBALDconsult15-Sep-10 3:06
mvePIEBALDconsult15-Sep-10 3:06 
Questionencoding and decoding in BASE 10 Pin
stephen.darling14-Sep-10 10:00
stephen.darling14-Sep-10 10:00 
I have searched and searched, and I just cannot find this solution. I know its out there becasuse I found it before.

Ok, I have a byte array of a fixed length, say 5 bytes.

I want to represent the byte array as a fixed length number, without using int, long etc etc.

I then want to be able to have the number entered by the user into an edit box, and encode it back to the byte array.

So, for example...

User enters the following (these are examples, not actual values)

2354 3488 3433 2332

Then this in decoded into its byte array representing the data.

In my seperate generator, I set the bytes, and it encodes as:

2354 3488 3433 2332

I am really looking for 2 brief code sample functions like the following

private void convertSerialNumber(string serial)
{

encode into byte array

}

private void convertByteToSerial (byte[] arr)
{

decode into serial (2354 3488 3433 2332

}

The reason I need to do this, is once I generate the byte array, I want to encrypt it.
If I simply use standard conversion routines, or use the string to int fuctions etc, I cannot do this

Could someone PLEASE provide brief coding examples.

I believe the functions I found before were custom functions using bit operators.

Converting and displaying as hex is no problem as they are built in, and I can find many examples of BASE32 encode/decode, but I relay want to represent my data as digits like 0000 0000 0000 0000

I hope this is clear enough as it is yet again driving me insane, and I am trying, I have spent a few months yet again.

Thank you so much in advance.
Steve
AnswerRe: encoding and decoding in BASE 10 Pin
Ennis Ray Lynch, Jr.14-Sep-10 10:11
Ennis Ray Lynch, Jr.14-Sep-10 10:11 
AnswerRe: encoding and decoding in BASE 10 [modified] Pin
Luc Pattyn14-Sep-10 10:18
sitebuilderLuc Pattyn14-Sep-10 10:18 
GeneralRe: encoding and decoding in BASE 10 Pin
harold aptroot14-Sep-10 10:23
harold aptroot14-Sep-10 10:23 
GeneralRe: encoding and decoding in BASE 10 Pin
Luc Pattyn14-Sep-10 10:24
sitebuilderLuc Pattyn14-Sep-10 10:24 
AnswerRe: encoding and decoding in BASE 10 Pin
T M Gray14-Sep-10 10:21
T M Gray14-Sep-10 10:21 
GeneralRe: encoding and decoding in BASE 10 Pin
stephen.darling14-Sep-10 10:55
stephen.darling14-Sep-10 10:55 
GeneralRe: encoding and decoding in BASE 10 Pin
AspDotNetDev14-Sep-10 11:22
protectorAspDotNetDev14-Sep-10 11:22 
GeneralRe: encoding and decoding in BASE 10 Pin
stephen.darling14-Sep-10 12:11
stephen.darling14-Sep-10 12:11 
GeneralRe: encoding and decoding in BASE 10 Pin
T M Gray14-Sep-10 12:17
T M Gray14-Sep-10 12:17 
GeneralRe: encoding and decoding in BASE 10 Pin
Luc Pattyn14-Sep-10 12:28
sitebuilderLuc Pattyn14-Sep-10 12:28 
GeneralRe: encoding and decoding in BASE 10 Pin
stephen.darling14-Sep-10 12:50
stephen.darling14-Sep-10 12:50 
GeneralRe: encoding and decoding in BASE 10 [modified] Pin
Luc Pattyn14-Sep-10 13:27
sitebuilderLuc Pattyn14-Sep-10 13:27 
GeneralRe: encoding and decoding in BASE 10 Pin
stephen.darling14-Sep-10 13:36
stephen.darling14-Sep-10 13:36 
GeneralRe: encoding and decoding in BASE 10 Pin
Luc Pattyn14-Sep-10 13:43
sitebuilderLuc Pattyn14-Sep-10 13:43 
GeneralRe: encoding and decoding in BASE 10 Pin
stephen.darling14-Sep-10 14:05
stephen.darling14-Sep-10 14:05 
GeneralRe: encoding and decoding in BASE 10 Pin
AspDotNetDev14-Sep-10 14:34
protectorAspDotNetDev14-Sep-10 14:34 
GeneralRe: encoding and decoding in BASE 10 Pin
stephen.darling14-Sep-10 14:57
stephen.darling14-Sep-10 14:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.