encoder.GetString() help

I

iMonkey

I have tried the following to convert an encrypted byte() into a string to
write it to a database:
Dim encoding as new UTF8Encoding()
Dim EncNum as String = encoding.GetString(
encoder.GetString(cypherText) )

CypherText being the string that has just been encrypted which is now in
stored using Byte() I believe

When I run this I get the following error:
BC30311: Value of type 'String' cannot be converted to '1-dimensional
array of Byte'.

I dont have any idea what I should try now as I have done nothing like this
before, any help will be much appreciated!

For reference purposes and if anyone wants it the code I used to encrypt my
string is located here:
http://aspalliance.com/cookbook/ViewSource.aspx?Filename=Recipe1509vb.aspx&RecipeType=ASPX

I have the decryption piece of code on a different page, this seems to be
working but can test it properly as it says the string that I have written
to the dtabase is not the correct length (This was before I tried to convert
it from Byte to string)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top