Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2002.06.20;
Скачать: CL | DM;

Вниз

не сильно сложный алгоритм шифрования   Найти похожие ветки 

 
psv   (2002-05-28 15:44) [0]

Люли. Кто знает хороший, но не сильно
сложный алгоритм шифрования.
Суть в том что-б писать в базу зашиврованые записи


 
Johnmen ©   (2002-05-28 15:59) [1]

Ой, Люли-Люли...
Придумать сами не смогли ?


 
vopros ©   (2002-05-28 16:10) [2]

>psv (28.05.02 15:44)
Зашифровать недолго. Ты сначала подумай как смотреть их будешь.


 
mrcat ©   (2002-05-28 16:33) [3]

Было бы логичным шифровать не записи, а БД целиком (если она не большая)...


 
Andrey ©   (2002-05-28 20:00) [4]

Вообще в интернете выложена куча таких алгоритмов, если не нашел значит плохо искал, если не искал поищи.

Непомню где содрал:

{
Sample application of the XOR algorithm for a simple
Crypt program

Author: Colin Laplace (webmaster@bloodshed.nu)

Public domain. Use this program at your own risk, and don"t use
it if you are not allowed in your country/state
}
program Crypt;
{$APPTYPE CONSOLE}
uses Windows;

var key, text, longkey, result : string;
i : integer;
toto, c : char;
F : TextFile;
begin
writeln("Enter the key:");
readln(key);
writeln("Enter the text:");
readln(text);

for i := 0 to (length(text) div length(key)) do
longkey := longkey + key;

for i := 1 to length(text) do begin
toto := chr((ord(text[i]) XOR ord(longkey[i]))); // XOR algorithm
result := result + toto;
end;
writeln("The crypted text is:");
writeln(result);
write("Should i save it to result.txt ?");
read(c);
if c in ["Y","y"] then begin
AssignFile(F,"result.txt");
Rewrite(F);
Writeln(F,result);
CloseFile(F);
end;
end.



{
Sample application of the XOR algorithm for a simple
Decrypt program

Author: Colin Laplace (webmaster@bloodshed.nu)

Public domain. Use this program at your own risk, and don"t use
it if you are not allowed in your country
}
program Decrypt;
{$APPTYPE CONSOLE}
uses Windows;

var key, c_text, longkey, result : string;
i : integer;
toto : char;
F : TextFile;
begin
writeln("Enter the key:");
readln(key);
writeln("Please make sure you have the file "result.txt" in the current directory");
// it takes the output file from Crypt.exe
AssignFile(F,"result.txt");
Reset(F);
Readln(F,c_text);
CloseFile(F);

for i := 0 to (length(c_text) div length(key)) do
longkey := longkey + key;

for i := 1 to length(c_text) do begin
toto := chr((ord(c_text[i]) XOR ord(longkey[i]))); // XOR algorithm
result := result + toto;
end;
writeln("The decrypted text is:");
writeln(result);
readln;
end.


 
psv   (2002-05-28 21:10) [5]

Спасибо большое



Страницы: 1 вся ветка

Текущий архив: 2002.06.20;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.012 c
3-64940
Ptr
2002-05-27 13:34
2002.06.20
SQL запрос


3-64954
vlv
2002-05-27 13:35
2002.06.20
Многопоточный обработчик вызовов к базе данных


1-65117
ed_209
2002-06-07 02:07
2002.06.20
Search in file


1-65101
Демон
2002-06-07 01:17
2002.06.20
2 вопроса про Таймер!!!


14-65238
Explorer
2002-05-17 11:28
2002.06.20
Кто работал с компонентами Flat Controls с AfalinaSoft.com?