Skip to Content
1

How to encode/decode XSTRING with BASE32 from RFC 4648

Jan 04 at 10:10 AM

79

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

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

Hi Tibor ,

Take a look at "cl_bcs_convert" class

Share
10 |10000 characters needed characters left characters exceeded