Главная страница
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.013 c
14-65252
Феликс
2002-05-16 00:37
2002.06.20
Бойцовский клуб. Still pumped from the using mouse...


14-65253
Sergo
2002-05-17 09:01
2002.06.20
Timer


1-65106
Agent Smith
2002-06-06 09:42
2002.06.20
И снова про Фотошоп


3-64907
Garry
2002-05-25 15:28
2002.06.20
Как узнать количество строк в наборе данных?


3-64946
ЮРИЙ_К
2002-05-27 15:55
2002.06.20
Строки в DBCtrlGrid разными цветами.