encoder.GetString() help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • iMonkey

    #1

    encoder.GetString() help

    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.GetStr ing(
    encoder.GetStri ng(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:


    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)


Working...