Click here to Skip to main content
15,917,795 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: handling CString in unicode Pin
_Magnus_25-Mar-04 2:40
_Magnus_25-Mar-04 2:40 
GeneralRe: handling CString in unicode Pin
David Crow25-Mar-04 2:42
David Crow25-Mar-04 2:42 
GeneralRe: handling CString in unicode Pin
_Magnus_25-Mar-04 2:43
_Magnus_25-Mar-04 2:43 
GeneralRe: handling CString in unicode Pin
Prakash Nadar25-Mar-04 2:45
Prakash Nadar25-Mar-04 2:45 
GeneralRe: handling CString in unicode Pin
Graham Bradshaw25-Mar-04 3:50
Graham Bradshaw25-Mar-04 3:50 
QuestionDirect Play Voice device share? Pin
tareqsiraj25-Mar-04 1:59
tareqsiraj25-Mar-04 1:59 
Generalabout xor encrytion... Pin
c028121925-Mar-04 1:48
c028121925-Mar-04 1:48 
GeneralRe: about xor encrytion... Pin
Dominik Reichl25-Mar-04 2:21
Dominik Reichl25-Mar-04 2:21 
"XOR encryption" doesn't exist, but I think you meant applying the key directly using the XOR operation to a buffer. Note that this way of "encrypting" something is VERY insecure and can be cracked on every computer in a few seconds (of course, if you use XOR encryption as a one-time-pad it cannot, but that's another thing).

Here's a source code snippet of using key-XOR to encrypt a buffer:

void XorEncryptDecrypt(unsigned char *pBuf, unsigned long uBufLen, char *pszPassword)
{
    unsigned long i;
    unsigned long j = 0, uMaxKey;

    uMaxKey = (unsigned long)strlen(pszPassword);

    for(i = 0; i < uBufLen; i++)
    {
        pBuf[i] ^= (unsigned char)pszPassword[j];

        j++;
        if(j == uMaxKey) j = 0;
    }
}


This function encrypts and decrypts a buffer (i.e. there aren't two different functions for either encrypting and decrypting). But again: this method is very insecure. If possible, search the web for AES or Rijndael, that's a very secure cipher.

Best regards, Smile | :)
Dominik



_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? Wink | ;)
(doesn't work on NT)

Questionwhat is rfind in vc++ Pin
Anonymous25-Mar-04 1:20
Anonymous25-Mar-04 1:20 
AnswerRe: what is rfind in vc++ Pin
toxcct25-Mar-04 1:41
toxcct25-Mar-04 1:41 
AnswerRe: what is rfind in vc++ Pin
Antony M Kancidrowski25-Mar-04 4:08
Antony M Kancidrowski25-Mar-04 4:08 
QuestionIs it possiible to set font for not integer size ? Pin
vgrigor25-Mar-04 1:07
vgrigor25-Mar-04 1:07 
GeneralLoading resouce from .dll Pin
nareshn225-Mar-04 0:38
nareshn225-Mar-04 0:38 
GeneralRequest for advice on design of complex dialog Pin
iknowindigo25-Mar-04 0:01
iknowindigo25-Mar-04 0:01 
GeneralIdentifying controls in CDialog Pin
JonWayne24-Mar-04 23:44
JonWayne24-Mar-04 23:44 
GeneralRe: Identifying controls in CDialog Pin
JonWayne24-Mar-04 23:59
JonWayne24-Mar-04 23:59 
GeneralRe: Identifying controls in CDialog Pin
toxcct25-Mar-04 1:44
toxcct25-Mar-04 1:44 
GeneralRe: Identifying controls in CDialog Pin
David Crow25-Mar-04 2:33
David Crow25-Mar-04 2:33 
GeneralLoad Resource's Bitmap To HBITMAP Pin
akirachen24-Mar-04 23:42
akirachen24-Mar-04 23:42 
GeneralCHtmlView inside SDI App. - Painting the Mainframe Pin
AssemblySoft24-Mar-04 22:28
AssemblySoft24-Mar-04 22:28 
GeneralPaste CF_METAFILEPICT in a rtf dialog box app Pin
Filomela24-Mar-04 21:57
Filomela24-Mar-04 21:57 
GeneralConversion... Pin
Anonymous24-Mar-04 21:51
Anonymous24-Mar-04 21:51 
GeneralRe: Conversion... Pin
Steve S24-Mar-04 22:05
Steve S24-Mar-04 22:05 
GeneralRe: Conversion... Pin
wb24-Mar-04 22:17
wb24-Mar-04 22:17 
GeneralRe: Conversion... Pin
Anonymous25-Mar-04 0:57
Anonymous25-Mar-04 0:57 

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.