Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > How to convert string to SecureString?

Reply
Thread Tools

How to convert string to SecureString?

 
 
Bishoy George
Guest
Posts: n/a
 
      08-23-2006
I want to pass a string password in System.Diagnostics.Process.Start.

The problem is that the defined password parameter is SecureString not
string while my password is string.

Normal casting evaluates to errors.

Please how to cast string to SecureString?

Many Thanks in Advance.

Bishoy



 
Reply With Quote
 
 
 
 
Bishoy George
Guest
Posts: n/a
 
      08-23-2006
"Bishoy George" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I want to pass a string password in System.Diagnostics.Process.Start.
>
> The problem is that the defined password parameter is SecureString
> not string while my password is string.
>
> Normal casting evaluates to errors.
>
> Please how to cast string to SecureString?
>
> Many Thanks in Advance.
>
> Bishoy
>
>
>

-------------------------------------

I found a simple way:

char[] passwordChars = passwordPre.ToCharArray();

SecureString password = new SecureString();

foreach (char c in passwordChars)

{

password.AppendChar(c);

}


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Convert formatted string to string? rockdale ASP .Net 3 04-12-2006 03:01 PM
convert string to raw string? Phd Python 3 12-06-2004 04:36 PM
Connection String object Convert to String Variable Type =?Utf-8?B?TWlrZSBNb29yZQ==?= ASP .Net 2 10-26-2004 02:43 PM
Convert string to a string array Andrew Banks ASP .Net 2 04-19-2004 04:45 PM



Advertisments