Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Базы";
Текущий архив: 2002.06.20;
Скачать: [xml.tar.bz2];

Вниз

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

 
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;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.006 c
1-65157
Tutov Roman
2002-06-07 12:02
2002.06.20
Шифрование строки.


1-65108
AndrewK
2002-06-06 14:26
2002.06.20
Как внедрить внешнее приложение в свое?


14-65234
BJValentine
2002-05-18 13:25
2002.06.20
Попандос, помогите


1-65039
bmai
2002-06-09 18:08
2002.06.20
2 вопроса по Hint -ам


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





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский