Click here to Skip to main content
15,559,459 members
Home / Discussions / C#
   

C#

 
GeneralProblem with FolderBrowserDialog Class Pin
ta10030-Dec-03 15:56
ta10030-Dec-03 15:56 
GeneralRe: Problem with FolderBrowserDialog Class Pin
Heath Stewart31-Dec-03 5:09
protectorHeath Stewart31-Dec-03 5:09 
GeneralRe: Problem with FolderBrowserDialog Class Pin
ta1001-Jan-04 7:31
ta1001-Jan-04 7:31 
GeneralPrinting Form Pin
IntegraSoft30-Dec-03 14:44
IntegraSoft30-Dec-03 14:44 
GeneralRe: Printing Form Pin
Mazdak30-Dec-03 20:41
Mazdak30-Dec-03 20:41 
GeneralRe: Printing Form Pin
Heath Stewart30-Dec-03 20:42
protectorHeath Stewart30-Dec-03 20:42 
QuestionDrawing panels in ownerdraw listbox? Pin
pwinant30-Dec-03 14:31
pwinant30-Dec-03 14:31 
GeneralPublic/Private Keys Pin
Guinness4Strength30-Dec-03 12:15
Guinness4Strength30-Dec-03 12:15 
I'm working on using RSA encryption in a Form Application. I'm stuck, How do I get access to the Public Key of the Public/Private Key pair ? Can I access it directly through RSAParameters ? I need to be able to send it over a socket.
Can I send the whole RSAParameters class over the socket some how ?

I'm triing to Serialize the RSAParameters Class but ehte resulting buffer is blank:
public byte [] GetPublicKeyBuff()
{
RSAParameters result = new RSAParameters();
try
{
BinaryFormatter formatter = new BinaryFormatter();
result = rsa.ExportParameters(false);
Stream s= new MemoryStream();
formatter.Serialize(s, result);
int iSize=(int)s.Length;
byte []PubKey = new byte[iSize];
s.Read(PubKey,0,iSize);

BinaryWriter bw = new BinaryWriter(File.OpenWrite("c:\\temp\\test\\pubkey.dat"));
bw.Write(PubKey,0,iSize);
bw.Close();

return PubKey;
}
catch (CryptographicException e)
{
Console.WriteLine(e.Message);
return null;
}

Any ideas out there ?


GeneralExecuting code for more than 1 statements Pin
Melanius30-Dec-03 11:42
Melanius30-Dec-03 11:42 
GeneralRe: Executing code for more than 1 statements Pin
Colin Angus Mackay30-Dec-03 11:54
Colin Angus Mackay30-Dec-03 11:54 
GeneralRe: Executing code for more than 1 statements Pin
Heath Stewart30-Dec-03 12:27
protectorHeath Stewart30-Dec-03 12:27 
GeneralRe: Executing code for more than 1 statements Pin
Melanius30-Dec-03 12:30
Melanius30-Dec-03 12:30 
GeneralRe: Executing code for more than 1 statements Pin
Melanius31-Dec-03 7:46
Melanius31-Dec-03 7:46 
GeneralGuid in DataTable Pin
Mazdak30-Dec-03 10:30
Mazdak30-Dec-03 10:30 
GeneralRe: Guid in DataTable Pin
Heath Stewart30-Dec-03 12:23
protectorHeath Stewart30-Dec-03 12:23 
GeneralRe: Guid in DataTable Pin
Mazdak30-Dec-03 20:30
Mazdak30-Dec-03 20:30 
GeneralRe: Guid in DataTable Pin
Heath Stewart30-Dec-03 20:39
protectorHeath Stewart30-Dec-03 20:39 
GeneralRe: Guid in DataTable Pin
Mazdak30-Dec-03 20:57
Mazdak30-Dec-03 20:57 
GeneralForm flashes beneath an OpenFileDialog or 2nd Form Pin
flipdoubt30-Dec-03 5:15
flipdoubt30-Dec-03 5:15 
GeneralRe: Form flashes beneath an OpenFileDialog or 2nd Form Pin
Heath Stewart30-Dec-03 6:58
protectorHeath Stewart30-Dec-03 6:58 
GeneralValue in Database Pin
Mazdak30-Dec-03 2:17
Mazdak30-Dec-03 2:17 
GeneralRe: Value in Database Pin
Heath Stewart30-Dec-03 6:51
protectorHeath Stewart30-Dec-03 6:51 
GeneralRe: Value in Database Pin
Mazdak30-Dec-03 7:32
Mazdak30-Dec-03 7:32 
GeneralRe: Value in Database Pin
Heath Stewart30-Dec-03 8:36
protectorHeath Stewart30-Dec-03 8:36 
GeneralRe: Value in Database Pin
Mazdak30-Dec-03 10:30
Mazdak30-Dec-03 10:30 

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.