CALCULATE_HMAC_FOR_RAW SAP Method Generic HMAC function (raw input)









Below is documentation, parameters and attributes of ABAP Method CALCULATE_HMAC_FOR_RAW within SAP class CL_ABAP_HMAC. There is also a number of example ABAP code snipts to help you use the functionality of this method.

This method is available within SAP systems depending on your version and release level, you can view further information by entering the class name CL_ABAP_HMAC into the relevant SAP transactions such as SE24 or SE80, and then selecting the method you are interested in.


Method Type - Static

This is a Static Method so you can call it directly

The following technical details of method CALCULATE_HMAC_FOR_RAW can also be found below:

  • Importing parameters
  • Exporting parameters
  • Changing parameters
  • Returning parameters
  • Exceptions
  • Coding Examples


Parameters of Method CALCULATE_HMAC_FOR_RAW

.

NameTypeData TypeDescriptionDefault Value
IF_ALGORITHMImportingTYPE
STRING
Hash Algorithm
IF_DATAImportingTYPE
XSTRING
Data
IF_KEYImportingTYPE
XSTRING
HMAC Key
IF_LENGTHImportingTYPE
I
Input length (0: strlen(data))
EF_HMACB64STRINGExportingTYPE
STRING
HMAC value as base64-encoded string
EF_HMACSTRINGExportingTYPE
STRING
HMAC value as hex-encoded string
EF_HMACXSTRINGExportingTYPE
XSTRING
HMAC value in binary format as XString



Exceptions of Method CALCULATE_HMAC_FOR_RAW

CX_ABAP_MESSAGE_DIGEST - Exception Class for Message Digest

Example ABAP coding


DATA: lv_EF_HMACB64STRING TYPE STRING,
lv_EF_HMACSTRING TYPE STRING,
lv_EF_HMACXSTRING TYPE XSTRING,
lv_IF_ALGORITHM TYPE STRING,
lv_IF_DATA TYPE XSTRING,
lv_IF_KEY TYPE XSTRING,
lv_IF_LENGTH TYPE I,
lv_other TYPE c.

CALL METHOD CL_ABAP_HMAC=>CALCULATE_HMAC_FOR_RAW(
EXPORTING
IF_ALGORITHM = lv_IF_ALGORITHM
IF_DATA = lv_IF_DATA
IF_KEY = lv_IF_KEY
IF_LENGTH = lv_IF_LENGTH
IMPORTING
EF_HMACB64STRING = lv_EF_HMACB64STRING
EF_HMACSTRING = lv_EF_HMACSTRING
EF_HMACXSTRING = lv_EF_HMACXSTRING ).

Links to Related Class(s)

CL_ABAP_...
Full list of available SAP object classes

Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!