Паролі доступу та безпека
Налаштування паролів на операції:
Виробнича версія
- Собівартість і специфікація.
- Звіти.
- Від'ємні знижки та націнки.
- Редактор готових звітів.
- Конфігуратор (два різних пароля).
- Конфігуратор без цін.
- Сервісні операції.
- Оплати.
- Заборони.
Дилерська версія
- Звіти.
- Від'ємні знижки та націнки.
- Сервісні операції.
- Оплати.
Шифрування даних
- Собівартість та націнки.
- Специфікація (calcrep).
Можливі значення ключа шифровуння даних:
-
Пусто або 0. Шифрування за допомогою HASP.
-
1. Шифрування вимкнено.
-
Дев'ятизначне число виду XXXYYYZZZ. Шифрування наступним алгоритмом:
procedure EncryptBuf(Buf: pointer; Length, Key: Integer); overload;
begin
if Key > 1 then EncryptBuf(Buf, Length, Key mod 1000, Key div 1000 mod 1000, Key div 1000 div 1000 mod 1000);
end;
Procedure EncryptBuf(Buf: pointer; Length, StartKey, MultKey, AddKey: Integer); overload;
var
i: Integer;
begin
for i := 1 to Length do
begin
byte(pointer(Integer(Buf) + i - 1)^) := byte(pointer(Integer(Buf) + i - 1)^) xor (StartKey shr 8);
StartKey := (byte(pointer(Integer(Buf) + i - 1)^) + StartKey) * MultKey + AddKey;
end;
end;Дешифрування:
procedure DecryptBuf(Buf: pointer; Length, Key: Integer); overload;
begin
if Key > 1 then DecryptBuf(Buf, Length, Key mod 1000, Key div 1000 mod 1000, Key div 1000 div 1000 mod 1000);
end;
procedure DecryptBuf(Buf: pointer; Length, StartKey, MultKey, AddKey: Integer); overload;
var
i: Integer;
TByte: byte;
begin
for i := 1 to Length do
begin
TByte := byte(pointer(Integer(Buf) + i - 1)^);
byte(pointer(Integer(Buf) + i - 1)^) := byte(pointer(Integer(Buf) + i - 1)^) xor (StartKey shr 8);
StartKey := (TByte + StartKey) * MultKey + AddKey;
end;
end;Ціна має тип DOUBLE, довжина 8 байтів.