ФМ CALCULATE_HASH_FOR_CHAR
Класс cl_abap_message_digest=>calculate_hash_for_char
Пример ФМ:
CALL FUNCTION 'CALCULATE_HASH_FOR_CHAR'
EXPORTING
alg = 'SHA1'
data = lv_tmp_str
IMPORTING
hash = lv_hash_str
EXCEPTIONS
unknown_alg = 1
param_error = 2
internal_error = 3
OTHERS = 4.
Нота 1410294 - Support SHA2-family for Message Digest and HMAC
Пример исп-ия класса:
DATA result type string.
TRY.
cl_abap_message_digest=>calculate_hash_for_char(
EXPORTING
if_algorithm = 'SHA512'
if_data = 'My String to Hash'
IMPORTING
ef_hashstring = result
).
CATCH cx_root.
ENDTRY.
Класс cl_abap_message_digest=>calculate_hash_for_char
Пример ФМ:
CALL FUNCTION 'CALCULATE_HASH_FOR_CHAR'
EXPORTING
alg = 'SHA1'
data = lv_tmp_str
IMPORTING
hash = lv_hash_str
EXCEPTIONS
unknown_alg = 1
param_error = 2
internal_error = 3
OTHERS = 4.
Нота 1410294 - Support SHA2-family for Message Digest and HMAC
Пример исп-ия класса:
DATA result type string.
TRY.
cl_abap_message_digest=>calculate_hash_for_char(
EXPORTING
if_algorithm = 'SHA512'
if_data = 'My String to Hash'
IMPORTING
ef_hashstring = result
).
CATCH cx_root.
ENDTRY.
Комментариев нет:
Отправить комментарий