l_result = new cl_http_utility( )->encode_base64( l_input ).
l_result = new cl_http_utility( )->decode_base64( l_input ).
Example Report
report zjso_base64.parameters pa_enc type text120.
parameters pa_dec type text120.
start-of-selection.
if pa_enc is not initial.
perform encode_base64 using pa_enc.
endif.
if pa_dec is not initial.
perform decode_base64 using pa_dec.
endif.
form encode_base64 using i_char type char120.
write: / |{ i_char } { 'base64-encoded is' } { new cl_http_utility( )->encode_base64( conv #( i_char ) ) }|.
endform.
form decode_base64 using i_char type char120.
write: / |{ i_char } { 'base64-decoded is' } { new cl_http_utility( )->decode_base64( conv #( i_char ) ) }|.
endform.
No comments:
Post a Comment