Главная страница
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-65215
Digitman
2002-05-17 17:29
2002.06.20
WinGate v4.5x +Win2000 server


3-64944
svn1024
2002-05-27 15:23
2002.06.20
HELP. Установка из InstallShield. Проект на находит драйвера...


4-65282
Darlok
2002-04-16 17:49
2002.06.20
Запуск программы от имени другого пользователя


1-65029
[BAD]Angel
2002-06-09 16:26
2002.06.20
Мастера здрасти!


1-65127
Dr. Web
2002-06-07 10:59
2002.06.20
Как сделать Scrolled toolbar?