Click here to Skip to main content
15,895,423 members
Home / Discussions / C#
   

C#

 
GeneralRe: string to string array Pin
Guffa7-Jun-06 12:38
Guffa7-Jun-06 12:38 
GeneralRe: string to string array Pin
Ed.Poore7-Jun-06 20:23
Ed.Poore7-Jun-06 20:23 
GeneralRe: string to string array Pin
vernchen7-Jun-06 23:05
vernchen7-Jun-06 23:05 
GeneralRe: string to string array Pin
Ed.Poore8-Jun-06 8:19
Ed.Poore8-Jun-06 8:19 
GeneralRe: string to string array Pin
Wjousts7-Jun-06 11:28
Wjousts7-Jun-06 11:28 
QuestionForce the Setup to RollBack()? [modified] Pin
Endren7-Jun-06 10:17
Endren7-Jun-06 10:17 
QuestionRSA Private Key Security Pin
Clonus7-Jun-06 10:00
Clonus7-Jun-06 10:00 
AnswerRe: RSA Private Key Security Pin
Ed.Poore7-Jun-06 10:37
Ed.Poore7-Jun-06 10:37 
Clonus wrote:
generate a keypair using .net 2.0

You create a keypair by creating a new instance of the RSACryptoServiceProvider class (key size can be specified in constructor), once created you can then access the keys either through the ToXmlString method or through ExportParameters (specifying the whether to include the private keys).
Clonus wrote:
private key secured with a passphrase

To do this you can use DESCryptoServiceProvider which accepts a key (but it must be a strong key) to encrypt data.  To create a strong key you could use the PasswordDeriveBytes class which can take a password string and a collection of random bytes and generate a key out of this.  Take a look at this article[^] on MSDN which will show how to use it.  You're only solution if you go down this road is to use constant (or calculable) "salt" bytes.  Perhaps the simplest (although not cryptographically secure) is to generate some random bytes once and then use these in all instances as the "salt" bytes.

There may be better ways around this but atleast these methods use the .NET Framework classes.  You're welcome to write your own encryption algorithm for the password storing of the private key.  It all depends on how secure you need it.



You know you're a Land Rover owner when the best route from point A to point B is through the mud.

Ed
GeneralRe: RSA Private Key Security Pin
Clonus8-Jun-06 2:59
Clonus8-Jun-06 2:59 
GeneralRe: RSA Private Key Security Pin
Clonus8-Jun-06 3:56
Clonus8-Jun-06 3:56 
GeneralRe: RSA Private Key Security Pin
Ed.Poore8-Jun-06 8:11
Ed.Poore8-Jun-06 8:11 
QuestionGetMembers and COM Pin
dcadenas7-Jun-06 9:00
dcadenas7-Jun-06 9:00 
QuestionUpdate progress bar from a separate project Pin
snorkie7-Jun-06 8:34
professionalsnorkie7-Jun-06 8:34 
AnswerRe: Update progress bar from a separate project Pin
Stefan Troschuetz7-Jun-06 10:01
Stefan Troschuetz7-Jun-06 10:01 
QuestionAborting / Killing Threads Pin
MrEyes7-Jun-06 8:08
MrEyes7-Jun-06 8:08 
AnswerRe: Aborting / Killing Threads Pin
Ed.Poore7-Jun-06 10:45
Ed.Poore7-Jun-06 10:45 
QuestionMDI form child closing [modified] Pin
ak877-Jun-06 6:51
ak877-Jun-06 6:51 
AnswerRe: MDI form child closing [modified] Pin
Josh Smith7-Jun-06 9:16
Josh Smith7-Jun-06 9:16 
QuestionConstraints [modified] Pin
kjosh7-Jun-06 6:48
kjosh7-Jun-06 6:48 
AnswerRe: Constraints Pin
dreynglar8-Jun-06 7:05
dreynglar8-Jun-06 7:05 
QuestionC#/SQL Question Pin
leckey7-Jun-06 6:27
leckey7-Jun-06 6:27 
AnswerRe: C#/SQL Question Pin
NaNg152417-Jun-06 6:50
NaNg152417-Jun-06 6:50 
GeneralRe: C#/SQL Question Pin
Colin Angus Mackay7-Jun-06 8:13
Colin Angus Mackay7-Jun-06 8:13 
AnswerRe: C#/SQL Question Pin
Gerald Schwab7-Jun-06 6:53
Gerald Schwab7-Jun-06 6:53 
GeneralRe: C#/SQL Question Pin
Colin Angus Mackay7-Jun-06 8:14
Colin Angus Mackay7-Jun-06 8:14 

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.