Re: Encrypt a string to a string and vice versa
From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 10/20/04
- Next message: Nicholas Paldino [.NET/C# MVP]: "Re: Displaying a form from a class library: Help needed!"
- Previous message: Esteban404: "Re: CAS and C#"
- In reply to: Matthias S.: "Re: Encrypt a string to a string and vice versa"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 20 Oct 2004 17:48:49 +0100
Matthias S. <matthias@_e_m_v_o_i_d_.de> wrote:
> sorry if I didn't make myself clear enough. The encryption method works
> fine (at least I don't get an exception anywhere, if the string is
> correctly encryption is left aside). The problem lies in the
> Decryption-part of the task, where I'm just creating a MemoryStream by
> converting the result of my previously mentioned encryption method using
> Convert.FromBase64String().
>
> The problem is, as soon as I call ReadByte on the CryptoStream, I get the
> CryptographicException mentioned below.
The problem is that the encryption *hasn't* worked - you've not got all
the data. You didn't get an exception, but you didn't get the right
data, either.
-- Jon Skeet - <skeet@pobox.com> http://www.pobox.com/~skeet If replying to the group, please do not mail me too
- Next message: Nicholas Paldino [.NET/C# MVP]: "Re: Displaying a form from a class library: Help needed!"
- Previous message: Esteban404: "Re: CAS and C#"
- In reply to: Matthias S.: "Re: Encrypt a string to a string and vice versa"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|