Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to encode/decode XSTRING with BASE32 from RFC 4648

Former Member
1,122

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.

1 REPLY 1

0 Kudos
254

Hi Tibor ,

Take a look at "cl_bcs_convert" class