Click here to Skip to main content
15,921,212 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionError Unable to open the project file from the webserver ". Pin
q19010521-Jan-06 16:02
q19010521-Jan-06 16:02 
Questionobject = (string + type) ? Pin
[Marc]21-Jan-06 6:06
[Marc]21-Jan-06 6:06 
AnswerRe: object = (string + type) ? Pin
Robert Rohde21-Jan-06 6:11
Robert Rohde21-Jan-06 6:11 
GeneralRe: object = (string + type) ? Pin
[Marc]21-Jan-06 8:09
[Marc]21-Jan-06 8:09 
AnswerRe: object = (string + type) ? Pin
Daniel Grunwald22-Jan-06 5:02
Daniel Grunwald22-Jan-06 5:02 
GeneralRe: object = (string + type) ? Pin
[Marc]22-Jan-06 10:04
[Marc]22-Jan-06 10:04 
QuestionRegistering a Serviced Component in the COM+ catalog Pin
oceanexplorer21-Jan-06 4:56
oceanexplorer21-Jan-06 4:56 
QuestionRelation between LegalKeySizes and LegalBlockSizes? Pin
Mark J. Miller20-Jan-06 6:54
Mark J. Miller20-Jan-06 6:54 
Trying to understand Cryptography so I'm writing a small utility which lets me select a key size and IV size based on the LegalKeySizes and LegalBlockSizes properties of the SymmetricAlgorithm class. If I always use the LegalBlockSizes[0].MinSize, then everything works fine. But if I were to use the code below I get the following error: System.Security.Cryptography.CryptographicException - "Specified initialization vector (IV) does not match the block size for this algorithm".

public void Encrypt(string input, string password)<br />
{<br />
    byte[] salt = new byte[]{0x31, 0x7E, 0x54, 0x7C, 0x6D, 0x30, 0x2B, 					   0x68, 0x79, 0x5E, 0x36, 0x3A, 0x31, 0x30, 						   0x24, 0x3D, 0x33, 0x76, 0x31, 0x6C};<br />
    PasswordDeriveBytes passBytes = new PasswordDeriveBytes(password, salt);<br />
<br />
    SymmetricAlgorithm alg = Rijndael.Create();<br />
    alg.Key = passBytes.GetBytes(alg.LegalKeySizes[0].MaxSize);<br />
    alg.IV = passBytes.GetBytes(alg.LegalBlockSizes[0].MaxSize);    //<--- throws exception<br />
<br />
   ///...... more code to finish encryption process ......<br />
<br />
}


In fact, if I use any legal block size other than the MinSize I get this error. Why is this?

Thanks,
Mark Miller
QuestionAccess files from remote computers Pin
snehal wale19-Jan-06 18:15
snehal wale19-Jan-06 18:15 
QuestionConverting MFC Dialogs to .net Framework Pin
kizhakk19-Jan-06 3:50
kizhakk19-Jan-06 3:50 
AnswerRe: Converting MFC Dialogs to .net Framework Pin
Dan Neely19-Jan-06 5:04
Dan Neely19-Jan-06 5:04 
GeneralRe: Converting MFC Dialogs to .net Framework Pin
kizhakk19-Jan-06 5:56
kizhakk19-Jan-06 5:56 
GeneralRe: Converting MFC Dialogs to .net Framework Pin
Dave Kreskowiak19-Jan-06 12:58
mveDave Kreskowiak19-Jan-06 12:58 
GeneralRe: Converting MFC Dialogs to .net Framework Pin
Kevin McFarlane21-Jan-06 4:15
Kevin McFarlane21-Jan-06 4:15 
QuestionMenuItem "Select" Event Pin
cbusgut19-Jan-06 1:22
cbusgut19-Jan-06 1:22 
QuestionTwainGUI Pin
snehal wale18-Jan-06 20:00
snehal wale18-Jan-06 20:00 
AnswerRe: TwainGUI Pin
Dave Kreskowiak19-Jan-06 12:56
mveDave Kreskowiak19-Jan-06 12:56 
GeneralRe: TwainGUI Pin
snehal wale19-Jan-06 17:17
snehal wale19-Jan-06 17:17 
GeneralRe: TwainGUI Pin
Dave Kreskowiak19-Jan-06 17:40
mveDave Kreskowiak19-Jan-06 17:40 
QuestionHow to Get Cumulative Sum in Cristal Reports Pin
badsy18-Jan-06 19:38
badsy18-Jan-06 19:38 
QuestionOffice PIA samples.. Pin
Ray Cassick18-Jan-06 18:25
Ray Cassick18-Jan-06 18:25 
QuestionSigning Assemblies with strong names Pin
oceanexplorer18-Jan-06 11:45
oceanexplorer18-Jan-06 11:45 
AnswerRe: Signing Assemblies with strong names Pin
shaileshk18-Jan-06 20:35
shaileshk18-Jan-06 20:35 
GeneralRegistering a serviced component in the COM+ catalog Pin
oceanexplorer21-Jan-06 4:54
oceanexplorer21-Jan-06 4:54 
QuestionGacutil tool in Framework 2.0 ??? Pin
shaileshk17-Jan-06 18:49
shaileshk17-Jan-06 18:49 

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.