1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-25 02:42:28 +02:00

Преобразование OPI -> OInt (workflow)

This commit is contained in:
Vitaly the Alpaca 2024-06-07 19:31:43 +00:00 committed by Vitaly the Alpaca (bot)
parent 07118c41c8
commit 2e7762bbb1
7 changed files with 10 additions and 11 deletions

View File

@ -179,9 +179,9 @@ Function ProcessTMAData(Val DataString, Val Token) Export
DataString = DecodeString(DataString, StringEncodingMethod.URLencoding);
DataStructure = OPI_Tools.RequestParametersToMap(DataString);
Key = "WebAppData";
KeyString = "WebAppData";
Hash = "";
BinaryKey = GetBinaryDataFromString(Key);
BinaryKey = GetBinaryDataFromString(KeyString);
Result = OPI_Cryptography.HMACSHA256(BinaryKey, GetBinaryDataFromString(Token));

View File

@ -365,9 +365,9 @@ Function UNIXTime(Val Date) Export
UNIX = Format(Date - Date(1970, 1, 1, 1, 0, 0), "HC=10; HDC=0; HG=0");
UNIX = StrReplace(UNIX, ",", "");
UNIX = Left(UNIX, 10);
UNIX = StrReplace(UNIX, Chars.NBSp, "");
UNIX = StrReplace(UNIX, " ", "");
UNIX = Left(UNIX, 10);
Return UNIX;

View File

@ -1,4 +1,3 @@
Manifest-Version: 1.0
Runtime-Version: 8.3.15
Base-Project: OpenIntegrations_Eng
Manifest-Version: 1.0
Base-Project: OpenIntegrations_ENG

View File

@ -179,9 +179,9 @@ Function ProcessTMAData(Val DataString, Val Token) Export
DataString = DecodeString(DataString, StringEncodingMethod.URLencoding);
DataStructure = OPI_Tools.RequestParametersToMap(DataString);
Key = "WebAppData";
KeyString = "WebAppData";
Hash = "";
BinaryKey = GetBinaryDataFromString(Key);
BinaryKey = GetBinaryDataFromString(KeyString);
Result = OPI_Cryptography.HMACSHA256(BinaryKey, GetBinaryDataFromString(Token));

View File

@ -365,9 +365,9 @@ Function UNIXTime(Val Date) Export
UNIX = Format(Date - Date(1970, 1, 1, 1, 0, 0), "HC=10; HDC=0; HG=0");
UNIX = StrReplace(UNIX, ",", "");
UNIX = Left(UNIX, 10);
UNIX = StrReplace(UNIX, Chars.NBSp, "");
UNIX = StrReplace(UNIX, " ", "");
UNIX = Left(UNIX, 10);
Return UNIX;

View File

@ -179,9 +179,9 @@
СтрокаДанных = РаскодироватьСтроку(СтрокаДанных, СпособКодированияСтроки.КодировкаURL);
СтруктураДанных = OPI_Инструменты.ПараметрыЗапросаВСоответствие(СтрокаДанных);
Ключ = "WebAppData";
КлючСтрокой = "WebAppData";
Хэш = "";
КлючДвоичные = ПолучитьДвоичныеДанныеИзСтроки(Ключ);
КлючДвоичные = ПолучитьДвоичныеДанныеИзСтроки(КлючСтрокой);
Результат = OPI_Криптография.HMACSHA256(КлючДвоичные, ПолучитьДвоичныеДанныеИзСтроки(Токен));

View File

@ -365,9 +365,9 @@
UNIX = Формат(Дата - Дата(1970, 1, 1, 1, 0, 0), "ЧЦ=10; ЧДЦ=0; ЧГ=0");
UNIX = СтрЗаменить(UNIX, ",", "");
UNIX = Лев(UNIX, 10);
UNIX = СтрЗаменить(UNIX, Символы.НПП, "");
UNIX = СтрЗаменить(UNIX, " ", "");
UNIX = Лев(UNIX, 10);
Возврат UNIX;