Go to the source code of this file.
◆ encrypt_tea()
uvec2 encrypt_tea |
( |
uvec2 |
arg | ) |
|
Definition at line 20 of file tiny_encryption_algorithm.h.
23 0xa341316c, 0xc8013ea4, 0xad90777d, 0x7e95761e
25 uint v0 = arg[0], v1 = arg[1];
27 uint delta = 0x9e3779b9;
30 for(
int i = 0; i < 16; i++) {
33 v0 += ((v1 << 4) + key[0]) ^ (v1 + sum) ^ ((v1 >> 5) + key[1]);
34 v1 += ((v0 << 4) + key[2]) ^ (v0 + sum) ^ ((v0 >> 5) + key[3]);