mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-02-09 13:47:03 +02:00
Merge branch 'main' of https://github.com/Bayselonarrend/OpenIntegrations
This commit is contained in:
commit
65d178c613
File diff suppressed because it is too large
Load Diff
@ -247,7 +247,7 @@ Function ProcessTMAData(Val DataString, Val Token) Export
|
||||
DCS = Left(DCS, StrLen(DCS) - 1);
|
||||
Signature = OPI_Cryptography.HMACSHA256(Result, ПолучитьДвоичныеДанныеИзСтроки(DCS));
|
||||
|
||||
Final = GetHexStringFromBinaryData(Signature);
|
||||
Final = ПолучитьHexСтрокуИзДвоичныхДанных(Signature);
|
||||
|
||||
If Final = Upper(Hash) Then
|
||||
Response = True;
|
||||
|
@ -69,7 +69,7 @@ Function HMAC(Val Key, Val Data, Type, BlockSize) Export
|
||||
EndIf;
|
||||
|
||||
If Key.Size() <= BlockSize Then
|
||||
Key = GetHexStringFromBinaryData(Key);
|
||||
Key = ПолучитьHexСтрокуИзДвоичныхДанных(Key);
|
||||
Key = Left(Key + RepeatString("00", BlockSize), BlockSize * Twice);
|
||||
EndIf;
|
||||
|
||||
|
@ -157,7 +157,7 @@ Function GetSpaceUsageData(Val Token) Export
|
||||
Headers = GetRequestHeaders(Token);
|
||||
|
||||
Response = OPI_Tools.PostBinary(URL
|
||||
, ПолучитьДвоичныеДанныеИзСтроки("null")
|
||||
, GetBinaryDataFromString("null")
|
||||
, Headers
|
||||
,
|
||||
, "text/plain; charset=dropbox-cors-hack");
|
||||
@ -782,7 +782,7 @@ Function ProcessObject(Val Token, Val URL, Val Path, Val InHeaders = False)
|
||||
|
||||
If InHeaders Then
|
||||
Headers = GetRequestHeaders(Token, Parameters);
|
||||
Response = OPI_Tools.PostBinary(URL, ПолучитьДвоичныеДанныеИзСтроки(""), Headers);
|
||||
Response = OPI_Tools.PostBinary(URL, GetBinaryDataFromString(""), Headers);
|
||||
Else
|
||||
Headers = GetRequestHeaders(Token);
|
||||
Response = OPI_Tools.Post(URL, Parameters, Headers);
|
||||
@ -908,7 +908,7 @@ Function OpenSession(Val Token)
|
||||
URL = "https://content.dropboxapi.com/2/files/upload_session/start";
|
||||
Headers = GetRequestHeaders(Token);
|
||||
|
||||
Response = OPI_Tools.PostBinary(URL, ПолучитьДвоичныеДанныеИзСтроки(""), Headers);
|
||||
Response = OPI_Tools.PostBinary(URL, GetBinaryDataFromString(""), Headers);
|
||||
|
||||
Return Response[SessionId];
|
||||
|
||||
@ -927,7 +927,7 @@ Function CloseSession(Val Token, Val Path, Val Mode, Val TotalSize, Val Session)
|
||||
Parameters = New Structure("commit,cursor", Commit, Cursor);
|
||||
Headers = GetRequestHeaders(Token, Parameters);
|
||||
|
||||
Response = OPI_Tools.PostBinary(URL, ПолучитьДвоичныеДанныеИзСтроки(""), Headers);
|
||||
Response = OPI_Tools.PostBinary(URL, GetBinaryDataFromString(""), Headers);
|
||||
|
||||
Return Response;
|
||||
|
||||
@ -954,7 +954,7 @@ Function GetOwnAccount(Val Token)
|
||||
Headers = GetRequestHeaders(Token);
|
||||
|
||||
Response = OPI_Tools.PostBinary(URL
|
||||
, ПолучитьДвоичныеДанныеИзСтроки("null")
|
||||
, GetBinaryDataFromString("null")
|
||||
, Headers
|
||||
,
|
||||
, "text/plain; charset=dropbox-cors-hack");
|
||||
|
@ -212,9 +212,9 @@ Function ProcessTMAData(Val DataString, Val Token) Export
|
||||
|
||||
KeyString = "WebAppData";
|
||||
Hash = "";
|
||||
BinaryKey = ПолучитьДвоичныеДанныеИзСтроки(KeyString);
|
||||
BinaryKey = GetBinaryDataFromString(KeyString);
|
||||
|
||||
Result = OPI_Cryptography.HMACSHA256(BinaryKey, ПолучитьДвоичныеДанныеИзСтроки(Token));
|
||||
Result = OPI_Cryptography.HMACSHA256(BinaryKey, GetBinaryDataFromString(Token));
|
||||
|
||||
TValue = New ValueTable;
|
||||
TValue.Columns.Add("Key");
|
||||
@ -245,7 +245,7 @@ Function ProcessTMAData(Val DataString, Val Token) Export
|
||||
EndDo;
|
||||
|
||||
DCS = Left(DCS, StrLen(DCS) - 1);
|
||||
Signature = OPI_Cryptography.HMACSHA256(Result, ПолучитьДвоичныеДанныеИзСтроки(DCS));
|
||||
Signature = OPI_Cryptography.HMACSHA256(Result, GetBinaryDataFromString(DCS));
|
||||
|
||||
Final = GetHexStringFromBinaryData(Signature);
|
||||
|
||||
|
@ -2126,8 +2126,8 @@ Procedure WriteCLICall(Val Library, Val Method, Val Options)
|
||||
BatString = StartBat + Library + " " + Method + BatSeparator + StrConcat(OptionsArray, BatSeparator);
|
||||
BashString = StartBash + Library + " " + Method + BashSeparator + StrConcat(OptionsArray, BashSeparator);
|
||||
|
||||
ПолучитьДвоичныеДанныеИзСтроки(BatString).Write(MethodCatalog + "/bat.txt");
|
||||
ПолучитьДвоичныеДанныеИзСтроки(BashString).Write(MethodCatalog + "/bash.txt");
|
||||
GetBinaryDataFromString(BatString).Write(MethodCatalog + "/bat.txt");
|
||||
GetBinaryDataFromString(BashString).Write(MethodCatalog + "/bash.txt");
|
||||
|
||||
EndProcedure
|
||||
|
||||
|
@ -616,8 +616,8 @@ Function CreateAuthorizationHeaderV1(Val Parameters, Val Fields, Val RequestType
|
||||
+ "&"
|
||||
+ EncodeString(Parameters["oauth_token_secret"], StringEncodingMethod.URLencoding);
|
||||
|
||||
Signature = OPI_Cryptography.HMAC(ПолучитьДвоичныеДанныеИзСтроки(Signature)
|
||||
, ПолучитьДвоичныеДанныеИзСтроки(SignatureString)
|
||||
Signature = OPI_Cryptography.HMAC(GetBinaryDataFromString(Signature)
|
||||
, GetBinaryDataFromString(SignatureString)
|
||||
, HashFunction.SHA1
|
||||
, 64);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user