Click here to Skip to main content
15,796,885 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSetting compiler name in win32.mak Pin
ForNow16-Apr-17 12:20
ForNow16-Apr-17 12:20 
AnswerRe: Setting compiler name in win32.mak Pin
Richard MacCutchan16-Apr-17 22:33
mveRichard MacCutchan16-Apr-17 22:33 
GeneralRe: Setting compiler name in win32.mak Pin
ForNow19-Apr-17 6:28
ForNow19-Apr-17 6:28 
QuestionHelp Pin
Member 1302311816-Apr-17 4:13
Member 1302311816-Apr-17 4:13 
AnswerRe: Help Pin
Richard MacCutchan16-Apr-17 4:46
mveRichard MacCutchan16-Apr-17 4:46 
GeneralRe: Help Pin
Member 1302311816-Apr-17 5:00
Member 1302311816-Apr-17 5:00 
GeneralRe: Help Pin
Richard MacCutchan16-Apr-17 5:06
mveRichard MacCutchan16-Apr-17 5:06 
GeneralRe: Help Pin
leon de boer16-Apr-17 5:30
leon de boer16-Apr-17 5:30 
You didn't look very hard the C code is right there in wikipedia (XTEA - Wikipedia[^])
#include <stdint.h>

/* take 64 bits of data in v[0] and v[1] and 128 bits of key[0] - key[3] */

void encipher(unsigned int num_rounds, uint32_t v[2], uint32_t const key[4]) {
    unsigned int i;
    uint32_t v0=v[0], v1=v[1], sum=0, delta=0x9E3779B9;
    for (i=0; i < num_rounds; i++) {
        v0 += (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (sum + key[sum & 3]);
        sum += delta;
        v1 += (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (sum + key[(sum>>11) & 3]);
    }
    v[0]=v0; v[1]=v1;
}

void decipher(unsigned int num_rounds, uint32_t v[2], uint32_t const key[4]) {
    unsigned int i;
    uint32_t v0=v[0], v1=v[1], delta=0x9E3779B9, sum=delta*num_rounds;
    for (i=0; i < num_rounds; i++) {
        v1 -= (((v0 << 4) ^ (v0 >> 5)) + v0) ^ (sum + key[(sum>>11) & 3]);
        sum -= delta;
        v0 -= (((v1 << 4) ^ (v1 >> 5)) + v1) ^ (sum + key[sum & 3]);
    }
    v[0]=v0; v[1]=v1;
}

The C implementation for PRESENT you can get here in 8, 16 or 32 bit ... PRESENT Encryption
In vino veritas


modified 16-Apr-17 10:36am.

GeneralRe: Help Pin
Member 1302311816-Apr-17 5:38
Member 1302311816-Apr-17 5:38 
GeneralRe: Help Pin
leon de boer16-Apr-17 6:50
leon de boer16-Apr-17 6:50 
GeneralRe: Help Pin
Member 1302311816-Apr-17 6:56
Member 1302311816-Apr-17 6:56 
GeneralRe: Help Pin
leon de boer16-Apr-17 7:01
leon de boer16-Apr-17 7:01 
Question3D room source code Pin
Member 1312838214-Apr-17 4:33
Member 1312838214-Apr-17 4:33 
AnswerRe: 3D room source code Pin
ZurdoDev14-Apr-17 4:35
professionalZurdoDev14-Apr-17 4:35 
AnswerRe: 3D room source code Pin
Richard MacCutchan14-Apr-17 5:20
mveRichard MacCutchan14-Apr-17 5:20 
AnswerRe: 3D room source code Pin
Rick York17-Apr-17 6:41
mveRick York17-Apr-17 6:41 
Questionhow to configure bio metric sensor to creating private pool? Pin
Premnath Mali14-Apr-17 2:34
professionalPremnath Mali14-Apr-17 2:34 
QuestionRe: how to configure bio metric sensor to creating private pool? Pin
Richard MacCutchan14-Apr-17 3:45
mveRichard MacCutchan14-Apr-17 3:45 
AnswerRe: how to configure bio metric sensor to creating private pool? Pin
Premnath Mali14-Apr-17 18:55
professionalPremnath Mali14-Apr-17 18:55 
GeneralRe: how to configure bio metric sensor to creating private pool? Pin
Richard MacCutchan14-Apr-17 23:12
mveRichard MacCutchan14-Apr-17 23:12 
GeneralRe: how to configure bio metric sensor to creating private pool? Pin
Premnath Mali15-Apr-17 0:36
professionalPremnath Mali15-Apr-17 0:36 
GeneralRe: how to configure bio metric sensor to creating private pool? Pin
Richard MacCutchan15-Apr-17 0:51
mveRichard MacCutchan15-Apr-17 0:51 
GeneralRe: how to configure bio metric sensor to creating private pool? Pin
Premnath Mali19-Apr-17 1:40
professionalPremnath Mali19-Apr-17 1:40 
GeneralRe: how to configure bio metric sensor to creating private pool? Pin
Premnath Mali19-Apr-17 1:40
professionalPremnath Mali19-Apr-17 1:40 
AnswerRe: how to configure bio metric sensor to creating private pool? Pin
ZurdoDev14-Apr-17 4:36
professionalZurdoDev14-Apr-17 4:36 

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.