Click here to Skip to main content
15,889,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSetting compiler name in win32.mak Pin
ForNow16-Apr-17 11:20
ForNow16-Apr-17 11:20 
AnswerRe: Setting compiler name in win32.mak Pin
Richard MacCutchan16-Apr-17 21:33
mveRichard MacCutchan16-Apr-17 21:33 
GeneralRe: Setting compiler name in win32.mak Pin
ForNow19-Apr-17 5:28
ForNow19-Apr-17 5:28 
QuestionHelp Pin
Member 1302311816-Apr-17 3:13
Member 1302311816-Apr-17 3:13 
AnswerRe: Help Pin
Richard MacCutchan16-Apr-17 3:46
mveRichard MacCutchan16-Apr-17 3:46 
GeneralRe: Help Pin
Member 1302311816-Apr-17 4:00
Member 1302311816-Apr-17 4:00 
GeneralRe: Help Pin
Richard MacCutchan16-Apr-17 4:06
mveRichard MacCutchan16-Apr-17 4:06 
GeneralRe: Help Pin
leon de boer16-Apr-17 4:30
leon de boer16-Apr-17 4: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 4:38
Member 1302311816-Apr-17 4:38 
GeneralRe: Help Pin
leon de boer16-Apr-17 5:50
leon de boer16-Apr-17 5:50 
GeneralRe: Help Pin
Member 1302311816-Apr-17 5:56
Member 1302311816-Apr-17 5:56 
GeneralRe: Help Pin
leon de boer16-Apr-17 6:01
leon de boer16-Apr-17 6:01 
Question3D room source code Pin
Member 1312838214-Apr-17 3:33
Member 1312838214-Apr-17 3:33 
AnswerRe: 3D room source code Pin
ZurdoDev14-Apr-17 3:35
professionalZurdoDev14-Apr-17 3:35 
AnswerRe: 3D room source code Pin
Richard MacCutchan14-Apr-17 4:20
mveRichard MacCutchan14-Apr-17 4:20 
AnswerRe: 3D room source code Pin
Rick York17-Apr-17 5:41
mveRick York17-Apr-17 5:41 
Questionhow to configure bio metric sensor to creating private pool? Pin
Premnath Mali14-Apr-17 1:34
professionalPremnath Mali14-Apr-17 1:34 
QuestionRe: how to configure bio metric sensor to creating private pool? Pin
Richard MacCutchan14-Apr-17 2:45
mveRichard MacCutchan14-Apr-17 2:45 
AnswerRe: how to configure bio metric sensor to creating private pool? Pin
Premnath Mali14-Apr-17 17:55
professionalPremnath Mali14-Apr-17 17:55 
GeneralRe: how to configure bio metric sensor to creating private pool? Pin
Richard MacCutchan14-Apr-17 22:12
mveRichard MacCutchan14-Apr-17 22:12 
GeneralRe: how to configure bio metric sensor to creating private pool? Pin
Premnath Mali14-Apr-17 23:36
professionalPremnath Mali14-Apr-17 23:36 
GeneralRe: how to configure bio metric sensor to creating private pool? Pin
Richard MacCutchan14-Apr-17 23:51
mveRichard MacCutchan14-Apr-17 23:51 
GeneralRe: how to configure bio metric sensor to creating private pool? Pin
Premnath Mali19-Apr-17 0:40
professionalPremnath Mali19-Apr-17 0:40 
GeneralRe: how to configure bio metric sensor to creating private pool? Pin
Premnath Mali19-Apr-17 0:40
professionalPremnath Mali19-Apr-17 0:40 
AnswerRe: how to configure bio metric sensor to creating private pool? Pin
ZurdoDev14-Apr-17 3:36
professionalZurdoDev14-Apr-17 3: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.