Hello ,
For those who don't know what TLV is:
Type/Tag-Length-Value (TLV) is an encoding scheme used in many communication protocols to encode data. A TLV-encoded message has a defined structure that consists of 3 sections/parts. Those are:
● Code of the message type (T) - 1 Byte fixed sizes of 1 byte (2 digits)
● Message value length (L) - 1 Byte fixed sizes of 1 byte (2 digits)
● Message value itself. (V) - Variable (variable size) includes the result of encoding the text string into hexadecimal
The coming example shows a string of TLV and the required result of encoding it into base64:
Example of a TLV:
01 15 42 6f 62 73 20 42 61 73 65 6d 65 6e 74 20 52 65 63 6f 72 64 73 02 0f 31 30 30 30 32 35 39 30 36 37 30 30 30 30 33 03 14 32 30 32 32 2d 30 34 2d 32 35 54 31 35 3a 33 30 3a 30 30 5a 04 0a 32 31 30 30 31 30 30 2e 39 39 05 09 33 31 35 30 31 35 2e 31 35
Encode this to a Base64 must represent:
ARVCb2JzIEJhc2VtZW50IFJlY29yZHMCDzEwMDAyNTkwNjcwMDAwMwMUMjAyMi0wNC0yNVQxNTozMDowMFoECjIxMDAxMDAuOTkFCTMxNTAxNS4xNQ==
Now, the question is, how to encode the previous TLV string into base64 programmatically in (AL) to get the base64 string shown above??
I hope my question is clear and thank you in advance for your support.
Regards,