Click here to Skip to main content
15,917,329 members
Home / Discussions / C#
   

C#

 
GeneralRe: interupting the loop with the button Pin
Blubbo3-Aug-06 5:26
Blubbo3-Aug-06 5:26 
AnswerRe: interupting the loop with the button Pin
Nader Elshehabi3-Aug-06 5:31
Nader Elshehabi3-Aug-06 5:31 
QuestionAsynchronous socket question Pin
Madmaximus3-Aug-06 4:39
Madmaximus3-Aug-06 4:39 
AnswerRe: Asynchronous socket question Pin
Tim Kohler3-Aug-06 5:56
Tim Kohler3-Aug-06 5:56 
GeneralPrefix Pin
Ennis Ray Lynch, Jr.3-Aug-06 5:59
Ennis Ray Lynch, Jr.3-Aug-06 5:59 
AnswerRe: Asynchronous socket question Pin
RizwanSharp3-Aug-06 6:11
RizwanSharp3-Aug-06 6:11 
QuestionImpersonation + Process.Start Pin
Gonzalo Brusella3-Aug-06 4:12
Gonzalo Brusella3-Aug-06 4:12 
AnswerRe: Impersonation + Process.Start Pin
Judah Gabriel Himango3-Aug-06 6:25
sponsorJudah Gabriel Himango3-Aug-06 6:25 
If you want to be secure, you can never store the password as a plain string. You'll need to read in the password character-by-character, decrypting each character. Once you've done this, you can clear out the contents of your character array.

The reason this is more secure is that strings, once created, cannot be cleared (since they are immutable). The .NET GC can even move strings around in memory, thus leaving your password in multiple places in memory. thus, there's a good chance someone inspecting your process's memory or the page file could discover your password. If you read your password in as a character array, you can construct a SecureString from it, after which you should immediately clear your character array. This makes it extremely difficult for someone to discover your password as the window of opportunity to intercept your password is very low. Here's[^] an excellent article on the purpose and uses of SecureString.

Optionally, you could read the password in as a string, then use unsafe code to clear the string in-place. I don't recommend doing this, but if you're up to it, here's an article[^] that will get you started in the right direction.


Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Messianic Instrumentals (with audio)
The apostle Paul, modernly speaking: Epistles of Paul

Judah Himango


GeneralRe: Impersonation + Process.Start Pin
Judah Gabriel Himango3-Aug-06 6:37
sponsorJudah Gabriel Himango3-Aug-06 6:37 
GeneralRe: Impersonation + Process.Start Pin
Gonzalo Brusella3-Aug-06 7:05
Gonzalo Brusella3-Aug-06 7:05 
QuestionCombobox problem Pin
ZeinaBaG3-Aug-06 3:37
ZeinaBaG3-Aug-06 3:37 
AnswerRe: Combobox problem Pin
stancrm3-Aug-06 3:44
stancrm3-Aug-06 3:44 
Questionspeed up application Pin
V.3-Aug-06 3:19
professionalV.3-Aug-06 3:19 
AnswerRe: speed up application Pin
yueue3-Aug-06 3:27
yueue3-Aug-06 3:27 
GeneralRe: speed up application Pin
V.3-Aug-06 3:33
professionalV.3-Aug-06 3:33 
AnswerRe: speed up application Pin
WillemM3-Aug-06 3:29
WillemM3-Aug-06 3:29 
GeneralRe: speed up application Pin
V.3-Aug-06 3:33
professionalV.3-Aug-06 3:33 
GeneralRe: speed up application Pin
V.3-Aug-06 4:09
professionalV.3-Aug-06 4:09 
GeneralRe: speed up application Pin
Dave Kreskowiak3-Aug-06 5:31
mveDave Kreskowiak3-Aug-06 5:31 
GeneralRe: speed up application Pin
V.3-Aug-06 6:52
professionalV.3-Aug-06 6:52 
QuestionRe: speed up application Pin
RizwanSharp3-Aug-06 20:02
RizwanSharp3-Aug-06 20:02 
AnswerRe: speed up application Pin
Dave Kreskowiak4-Aug-06 2:02
mveDave Kreskowiak4-Aug-06 2:02 
QuestionRe: speed up application Pin
RizwanSharp4-Aug-06 2:34
RizwanSharp4-Aug-06 2:34 
AnswerRe: speed up application Pin
Dave Kreskowiak4-Aug-06 2:49
mveDave Kreskowiak4-Aug-06 2:49 
GeneralRe: speed up application Pin
RizwanSharp4-Aug-06 3:07
RizwanSharp4-Aug-06 3:07 

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.