Skip to Content
avatar image
Former Member

How to encode/decode XSTRING with BASE32 from RFC 4648

Hi,

I want to encode/decode a XSTRING with BASE32 from RFC 4648.

The encoded sequence is "AAAA BBBB CCCC DDDD" and the expected XSTRING is hexdecimal 00 00 00 84 21 10 84 21 8C 63.

I got a Google hit with "ABAP base32" in SCN Wiki > Code Gallery:

The class /ui2/cl_number implemented BASE32 encoding for number, but not for XSTRING (byte stream).

There is a lot of BASE64 encoding/decoding, but I found no reuseable BASE32 implementation yet in SAP_BASIS.

Is there a BASE32 encode/decode function/method somewhere in ABAP?

Thanks.

P.S.

I already implemented the RFC 4648 with BASE16 / BASE32 / BASE32hex / BASE64 in a Z-class for myself. Want just to be sure, that there is really no implementation, which I have not yet found.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jan 04 at 01:08 PM

    Hi Tibor ,

    Take a look at "cl_bcs_convert" class

    Add comment
    10|10000 characters needed characters exceeded