tea.inc
143.53.36.235:8080/tea.htm
VIP Сървъри
Всички сървъри
/*
Tiny Encryption Algorithm
from http://143.53.36.235:8080/tea.htm
or http://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm
developed for Cerberus project
by Zefir<[email protected]>
http://up.org.ua/
xmpp://[email protected]/
http://cerberus.cstrike.in.ua/
13 december 2010 (c) Zefir
*/
#if defined _tea_included
#endinput
#endif
#define _tea_included
stock tea_crypt_str(str[], key[4]) {
new len = strlen(str);
if (len & 1)
set_fail_state("Length of the string for tea_crypt_str() must be even")
while (len > 0)
tea_crypt(str[len -= 2], key);
}
stock tea_decrypt_str(str[], key[4]) {
new len = strlen(str);
if (len & 1)
set_fail_state("Length of the string for tea_decrypt_str() must be even")
while (len > 0)
tea_decrypt(str[len -= 2], key);
}
stock tea_crypt(str[], key[4]) {
new y = str[0], z = str[1], sum = 0,
delta = 0x9e3779b9, n = 32;
new k0 = key[0], k1 = key[1], k2 = key[2], k3 = key[3];
while (n-- > 0) {
sum += delta;
y += ((z << 4) + k0) ^ (z + sum ^ (z >>> 5) + k1);
z += ((y << 4) + k2) ^ (y + sum ^ (y >>> 5) + k3);
}
str[0] = y; str[1] = z;
}
stock tea_decrypt(str[], key[4]) {
new y = str[0], z = str[1], sum = 0xC6EF3720,
delta = 0x9e3779b9, n = 32;
new k0 = key[0], k1 = key[1], k2 = key[2], k3 = key[3];
while (n-- > 0) {
z -= ((y << 4) + k2) ^ (y + sum) ^ ((y >>> 5) + k3);
y -= ((z << 4) + k0) ^ (z + sum) ^ ((z >>> 5) + k1);
sum -= delta;
}
str[0] = y; str[1] = z;
}
КАК ДА ИЗПОЛЗВАМ
Добави в началото на .sma файла:
#include <tea>
1. Изтегли
Свали файла от бутона по-горе
2. Копирай
Постави в
scripting/include/3. Включи
Добави #include директивата
4. Компилирай
Използвай amxxpc или scripting/compile.exe