Classic ASP Function - Hex encoded binary string to text
$30-250 USD
W trakcie realizacji
Opublikowano prawie 13 lat temu
$30-250 USD
Płatne przy odbiorze
We need someone to code a classic asp function to convert a hex-encoded binary string to text.
There are two ways data will be passed into the function.
Example 1:
Call FunctionName("48656c6c6f20576f726c64", false)
This should convert "48656c6c6f20576f726c64" to the simple text "Hello World" (without the quotes). This involves converting the hex-encoded binary string only.
Example 2:
Call FunctionName("05000300010148656c6c6f20576f726c64", true)
This example is different because the first item passed to the function contains additional information.
If the second parameter passed to the function is true, then the first byte of the second parameter indicates how much of the data following it should be removed before processing. For example, if the first byte is 0x05, then the total portion of the first parameter is 6 bytes long (1 byte for length field plus the 5 bytes for the header portion). In this case, you should ignore the first 6 bytes of data.
Both of the following calls should return "Hello World" (again, without the quotes)
Call FunctionName("05000300010148656c6c6f20576f726c64", true)
Call FunctionName("48656c6c6f20576f726c64", false)
Obviously, the function should allow for different lengths of additional information, and not just the 5 used in this example.