Click here to Skip to main content
15,923,852 members
Home / Discussions / C#
   

C#

 
GeneralRe: Cancel more than a click Pin
Heath Stewart13-May-04 3:19
protectorHeath Stewart13-May-04 3:19 
GeneralDES Crypto help Pin
yyzzababa13-May-04 2:43
yyzzababa13-May-04 2:43 
GeneralRe: DES Crypto help Pin
gek_at13-May-04 2:50
gek_at13-May-04 2:50 
GeneralRe: DES Crypto help Pin
Heath Stewart13-May-04 3:23
protectorHeath Stewart13-May-04 3:23 
GeneralRe: DES Crypto help Pin
gek_at13-May-04 3:50
gek_at13-May-04 3:50 
GeneralRe: DES Crypto help Pin
Heath Stewart13-May-04 3:56
protectorHeath Stewart13-May-04 3:56 
GeneralRe: DES Crypto help Pin
gek_at13-May-04 4:53
gek_at13-May-04 4:53 
GeneralRe: DES Crypto help Pin
Heath Stewart13-May-04 3:26
protectorHeath Stewart13-May-04 3:26 
While I agree with gek_at (and this is a common approach), another way depends on how you save the encrypted file. Using different extensions is still better, but you could stream the cipher text through a ToBase64Transform and enclose the base64 text in something like what PGP does:
----- BEGIN ENCRYPTED TEXT -----
base64 encoded cipher text
----- END ENCRYPTED TEXT -----
Then you could check that the first and last lines contain this text. Of course, someone could spoof it or mistakenly include those in their file (but what are the chances of that?), but even PGP would complain about such an error. Also, PGP can also parse an entire text file and treat anything not in between these lines (and it can handle multiple blocks of encased cipher text like this) as unencrypted text.

 

Microsoft MVP, Visual C#
My Articles
GeneralInter Process Communication Pin
gek_at13-May-04 2:31
gek_at13-May-04 2:31 
GeneralRe: Inter Process Communication Pin
Heath Stewart13-May-04 3:45
protectorHeath Stewart13-May-04 3:45 
GeneralRe: Inter Process Communication Pin
gek_at13-May-04 8:18
gek_at13-May-04 8:18 
Questionhow do I marshal lpvoid pointer in a funcion? Pin
Paolo Ponzano13-May-04 2:24
Paolo Ponzano13-May-04 2:24 
AnswerRe: how do I marshal lpvoid pointer in a funcion? Pin
Heath Stewart13-May-04 3:29
protectorHeath Stewart13-May-04 3:29 
GeneralRe: how do I marshal lpvoid pointer in a funcion? Pin
Paolo Ponzano13-May-04 4:40
Paolo Ponzano13-May-04 4:40 
GeneralRe: how do I marshal lpvoid pointer in a funcion? Pin
Heath Stewart13-May-04 5:04
protectorHeath Stewart13-May-04 5:04 
GeneralRe: how do I marshal lpvoid pointer in a funcion? Pin
Paolo Ponzano13-May-04 5:27
Paolo Ponzano13-May-04 5:27 
GeneralRe: how do I marshal lpvoid pointer in a funcion? Pin
Heath Stewart13-May-04 6:21
protectorHeath Stewart13-May-04 6:21 
GeneralRe: how do I marshal lpvoid pointer in a funcion? Pin
Paolo Ponzano13-May-04 7:20
Paolo Ponzano13-May-04 7:20 
GeneralRe: how do I marshal lpvoid pointer in a funcion? Pin
Heath Stewart13-May-04 9:37
protectorHeath Stewart13-May-04 9:37 
GeneralRe: how do I marshal lpvoid pointer in a funcion? Pin
Paolo Ponzano13-May-04 11:43
Paolo Ponzano13-May-04 11:43 
GeneralRe: how do I marshal lpvoid pointer in a funcion? Pin
Heath Stewart13-May-04 12:36
protectorHeath Stewart13-May-04 12:36 
GeneralRe: how do I marshal lpvoid pointer in a funcion? Pin
Paolo Ponzano13-May-04 20:18
Paolo Ponzano13-May-04 20:18 
GeneralRe: how do I marshal lpvoid pointer in a funcion? Pin
Heath Stewart14-May-04 2:16
protectorHeath Stewart14-May-04 2:16 
GeneralUserControl and how to add controls to it Pin
Boaz V13-May-04 1:24
Boaz V13-May-04 1:24 
GeneralRe: UserControl and how to add controls to it Pin
Boaz V13-May-04 1:34
Boaz V13-May-04 1:34 

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.