Go to the source code of this file.
Defines | |
#define | XTDELTA 0x9e3779b9 |
#define | XTSUM 0xC6EF3720 |
#define | ROUNDS 32 |
Functions | |
void | XTeaCrypt (uint32_t *w, CONST uint32_t *v, CONST XTeaKeyBlock_t k) |
Encrypt a 64bit block with XTEA algorythm. | |
void | XTeaDecrypt (uint32_t *w, CONST uint32_t *v, CONST XTeaKeyBlock_t k) |
Decrypt a 64bit block with XTEA algorythm. | |
void | XTeaCryptStr (char *dst, CONST char *src, uint16_t len, CONST char *pass) |
Encrypt a string with XTEA algorythm. | |
void | XTeaDecryptStr (char *dst, CONST char *src, uint16_t len, CONST char *pass) |
Decrypt a string with XTEA algorythm. |
#define XTDELTA 0x9e3779b9 |
Definition at line 58 of file xtea.c.
Referenced by XTeaCrypt(), and XTeaDecrypt().
#define XTSUM 0xC6EF3720 |
Definition at line 59 of file xtea.c.
Referenced by XTeaDecrypt().
#define ROUNDS 32 |
Definition at line 60 of file xtea.c.
Referenced by XTeaCrypt().
void XTeaCrypt | ( | uint32_t * | w, |
CONST uint32_t * | v, | ||
CONST XTeaKeyBlock_t | k | ||
) |
Encrypt a 64bit block with XTEA algorythm.
w Destination pointer to 2x32 bit encrypted block. v Source pointer of 2x32 bit plain text block. k Pointer to 128 bit (4*32bit) key block.
Definition at line 69 of file xtea.c.
References ROUNDS, and XTDELTA.
Referenced by XTeaCryptStr().
void XTeaDecrypt | ( | uint32_t * | w, |
CONST uint32_t * | v, | ||
CONST XTeaKeyBlock_t | k | ||
) |
Decrypt a 64bit block with XTEA algorythm.
w Destination pointer to 2x32 bit decrypted block. v Source pointer of 2x32 bit encrypted block. k Pointer to 128 bit (4*32bit) key block.
Definition at line 93 of file xtea.c.
References XTDELTA, and XTSUM.
Referenced by XTeaDecryptStr().
void XTeaCryptStr | ( | char * | dst, |
CONST char * | src, | ||
uint16_t | len, | ||
CONST char * | pass | ||
) |
Encrypt a string with XTEA algorythm.
Respect that the strings or buffers of src and dst strings have to have a length of multiple of 8 as it is a 64 bit based algorhythm.
dst Target buffer to place the encrypted string into. src Source buffer to get the clear text string from. len Length of the string to encrypt. pass Buffer of 64 bytes used as passphrase.
Definition at line 122 of file xtea.c.
References CONST, memcpy(), strlen(), and XTeaCrypt().
void XTeaDecryptStr | ( | char * | dst, |
CONST char * | src, | ||
uint16_t | len, | ||
CONST char * | pass | ||
) |
Decrypt a string with XTEA algorythm.
Respect that the strings or buffers of src and dst strings have to have a length of multiple of 8 as it is a 64 bit based algorhythm.
dst Target buffer to place the decrypted string into. src Source buffer to get the encrypted string from. len Length of the string to decrypt. pass Buffer of 64 bytes used as passphrase.
Definition at line 154 of file xtea.c.
References CONST, memcpy(), strlen(), and XTeaDecrypt().