"Bad Data" Exception w/ TripleDES
From: Troy Busot (troy@busot.com)
Date: 03/13/03
- Previous message: Chris: "Re: Forms Authentication - Multiple Web Projects"
- Next in thread: [MSFT]Allen: "RE: "Bad Data" Exception w/ TripleDES"
- Reply: [MSFT]Allen: "RE: "Bad Data" Exception w/ TripleDES"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Troy Busot" <troy@busot.com> Date: Wed, 12 Mar 2003 16:17:09 -0700
I get random -but consistent - CryptographicException: Bad Data exceptions
when using TripleDES encryption.
For instance, when looping over i = 0 - 100, I always get errors when
tryping to decrypt the numbers 60 and 96.
for( int i = 0; i < 100; i++ ){
try
{
string t = StringUtility.EncryptString( i.ToString() );
Response.Write( t + " : " );
Response.Write( StringUtility.DecryptString( t ) + "<br>" );
}
catch( Exception )
{
Response.Write( i + " bad data.<br>" );
}
}
- Previous message: Chris: "Re: Forms Authentication - Multiple Web Projects"
- Next in thread: [MSFT]Allen: "RE: "Bad Data" Exception w/ TripleDES"
- Reply: [MSFT]Allen: "RE: "Bad Data" Exception w/ TripleDES"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]