From 8751885ea79df4b666b65bb2b6900617785e0da7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 4 Jun 2013 07:55:00 +0000 Subject: end of base64* zoo git-svn-id: http://svn.miranda-ng.org/main/trunk@4879 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/delphi/m_core.inc | 4 ++-- include/delphi/m_netlib.inc | 45 --------------------------------------------- 2 files changed, 2 insertions(+), 47 deletions(-) (limited to 'include/delphi') diff --git a/include/delphi/m_core.inc b/include/delphi/m_core.inc index 0b14858923..0be77bbe48 100644 --- a/include/delphi/m_core.inc +++ b/include/delphi/m_core.inc @@ -553,9 +553,9 @@ procedure mir_sha1_hash(dataIn:pmir_sha1_byte_t; len:int;hashout:SHA1Hash); stdc /////////////////////////////////////////////////////////////////////////////// // strings -function mir_base64_decode(str:pAnsiChar):pAnsiChar; stdcall; +function mir_base64_decode(str:pAnsiChar; var resultSize:int):PByte; stdcall; external CoreDLL name 'mir_base64_decode'; -function mir_base64_encode(str:pAnsiChar):pAnsiChar; stdcall; +function mir_base64_encode(data:PByte; dataSize:int):pAnsiChar; stdcall; external CoreDLL name 'mir_base64_encode'; function rtrim(str:pAnsiChar):pAnsiChar; stdcall; diff --git a/include/delphi/m_netlib.inc b/include/delphi/m_netlib.inc index 69df8f5793..3c86e7517b 100644 --- a/include/delphi/m_netlib.inc +++ b/include/delphi/m_netlib.inc @@ -282,14 +282,6 @@ type combinePackets : int; // MIRANDA_VER >= 0x0900 end; - PNETLIBBASE64 = ^TNETLIBBASE64; - TNETLIBBASE64 = record - pszEncoded: PAnsiChar; - cchEncoded: int; - pbDecoded : PByte; - cbDecoded : int; - end; - type PNETLIBBUFFER = ^TNETLIBBUFFER; TNETLIBBUFFER = record @@ -506,43 +498,6 @@ const } MS_NETLIB_URLENCODE:PAnsiChar = 'Netlib/UrlEncode'; - { - wParam : 0 - lParam : Pointer to a TNETLIBBASE64 initialised structure - Affects: Decodes a Base64 null terminated string, see notes - Returns: [non zero] on success, NULL(0) on failure - Notes : TNETLIBBASE64.pszEncoded and cchEncoded must contain a pointer to - a buffer to use as input, and it's length, the length - should not include space taken for null termination -- - - - Output is placed in ..pbDecoded and ..cbDecoded for buffer and - length of buffer -- the maxiumum output for a given input can - be worked out with Netlib_GetBase64DecodedBufferSize() function - see below. - - - For more information on Base64 see rfc-1421. - Errors : ERROR_INVALID_PARAMETER, ERROR_INVALID_DATA, ERROR_BUFFER_OVERFLOW - } - MS_NETLIB_BASE64DECODE:PAnsiChar = 'Netlib/Base64Decode'; - - { - wParam : 0 - lParam : Pointer to an initialised TNETLIBBASE64 structure - Affect : Base64 encode a string, see notes - Returns: [non zero] on success, NULL(0) on failure - Notes : TNETLIBBASE64.pbDecode and TNETLIBBASE64.cbDecoded contain - the input buffer and it's length -- - TNETLIBBASE64.pszEncoded and TNETLIBBASE64.cchEncoded contain the - buffer in which to put the output and it's length. - - - The maximum output size for a given input can be worked - out with the function Netlib_GetBase64EncodedBufferSize() below - .pszEncoded is null terminated, on return TNETLIBBASE64.cchEncoded - is set to the actual length excluding 0. - Errors : ERROR_INVALID_PARAMETER, ERROR_BUFFER_OVERFLOW - } - MS_NETLIB_BASE64ENCODE:PAnsiChar = 'Netlib/Base64Encode'; - { Converts string representation of IP and port into numerical SOCKADDR_INET IPv4 could supplied in formats address:port or address -- cgit v1.2.3