Click here to Skip to main content
16,021,041 members
Home / Discussions / C#
   

C#

 
GeneralRe: What version to buy Pin
SimonS6-Sep-03 9:25
SimonS6-Sep-03 9:25 
GeneralDelegates and Remoting Pin
J. Dunlap5-Sep-03 18:23
J. Dunlap5-Sep-03 18:23 
GeneralRe: Delegates and Remoting Pin
leppie5-Sep-03 21:34
leppie5-Sep-03 21:34 
GeneralRe: Delegates and Remoting Pin
J. Dunlap5-Sep-03 21:38
J. Dunlap5-Sep-03 21:38 
GeneralRe: Delegates and Remoting Pin
leppie5-Sep-03 21:44
leppie5-Sep-03 21:44 
GeneralRe: Delegates and Remoting Pin
J. Dunlap5-Sep-03 21:49
J. Dunlap5-Sep-03 21:49 
GeneralBad Data Pin
ravingcoder5-Sep-03 17:42
ravingcoder5-Sep-03 17:42 
GeneralPlease take a look at my code. Pin
ravfingcoder6-Sep-03 0:19
ravfingcoder6-Sep-03 0:19 
Hi, having trouble decrypting a buffer using RSA. Did you find solution to the problem yet? Here's the code - I've highlighted the problem with "QUESTION" tags. Here's my code, please take a look. Thanks.

using System;
using System.Text;
using System.Security.Cryptography;

namespace tryRSA
{
///
/// Summary description for Class1.
///

class Class1
{
///
/// The main entry point for the application.
///

[STAThread]
static void Main(string[] args)
{ //Main

int index=0;
int iterations=0;
int blocksize=0;
int KeySizeByte=0;

byte [] btSecret;
byte [] btEncryptedSecret;
byte [] btDescrambledSecret;

byte [] btPlainTxtToken;
byte [] btEncryptedToken;

string secret = "This is a long secret";

ASCIIEncoding AE = new ASCIIEncoding();

RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();

KeySizeByte = RSA.KeySize/8;
blocksize = KeySizeByte -11; //QUESTION 1: I've been told that blocksize is equal Key size less 11 bytes. How'd you know that?

Console.WriteLine("Key size: {0}", KeySizeByte);
Console.WriteLine("blocksize: {0}", blocksize);

btSecret = AE.GetBytes(secret);

if(btSecret.Length % blocksize != 0)
{
iterations = btSecret.Length/blocksize +1;
}
else
{
iterations = btSecret.Length/blocksize;
}

index=0;
btPlainTxtToken = new byte [blocksize];
btEncryptedSecret = new byte [iterations*blocksize];
for(int i=0; i
GeneralRounded rectangle Pin
Meysam Mahfouzi5-Sep-03 17:41
Meysam Mahfouzi5-Sep-03 17:41 
GeneralRe: Rounded rectangle Pin
Meysam Mahfouzi5-Sep-03 19:09
Meysam Mahfouzi5-Sep-03 19:09 
GeneralRunning C# console on UNIX Pin
SuwitLam5-Sep-03 16:29
SuwitLam5-Sep-03 16:29 
GeneralRe: Running C# console on UNIX Pin
Shock The Dark Mage5-Sep-03 17:04
Shock The Dark Mage5-Sep-03 17:04 
GeneralRe: Running C# console on UNIX Pin
leppie5-Sep-03 21:50
leppie5-Sep-03 21:50 
GeneralRe: Running C# console on UNIX Pin
leppie5-Sep-03 22:05
leppie5-Sep-03 22:05 
QuestionAnimation Control in C#? Pin
Khang Nguyen5-Sep-03 13:34
Khang Nguyen5-Sep-03 13:34 
AnswerRe: Animation Control in C#? Pin
Khang Nguyen5-Sep-03 13:44
Khang Nguyen5-Sep-03 13:44 
Questionrunning c# program on Linux? Pin
Asim N.5-Sep-03 9:52
Asim N.5-Sep-03 9:52 
AnswerRe: running c# program on Linux? Pin
leppie5-Sep-03 10:07
leppie5-Sep-03 10:07 
GeneralMDI problem Pin
r95-Sep-03 9:47
r95-Sep-03 9:47 
GeneralRe: MDI problem Pin
Ray Cassick5-Sep-03 11:52
Ray Cassick5-Sep-03 11:52 
GeneralRe: MDI problem Pin
Anonymous5-Sep-03 13:23
Anonymous5-Sep-03 13:23 
GeneralRe: MDI problem Pin
sumeat10-Sep-03 13:16
sumeat10-Sep-03 13:16 
GeneralDirectory Services .. LDAP Pin
sulmun5-Sep-03 9:06
sulmun5-Sep-03 9:06 
GeneralPlease Wait page while search executes Pin
clayne5-Sep-03 8:38
clayne5-Sep-03 8:38 
GeneralRe: Please Wait page while search executes Pin
GISnet5-Sep-03 9:23
GISnet5-Sep-03 9:23 

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.