SAP ABAP Class CL_ABAP_HMAC (Message Authentication Code (MAC) of a message)
Hierarchy
SAP_BASIS (Software Component) SAP Basis Component
   BC-SEC (Application Component) Security
     SECH (Package) Security: MD5-Hash (Copyright by RSA Data Security, Inc)
Properties
Class CL_ABAP_HMAC  
Short Description Message Authentication Code (MAC) of a message    
Super Class    
Instantiability of a Class 0  Private 
Final    
General Data
Message Class MD5    
Program status S  System Program 
Category 0   
Package SECH   Security: MD5-Hash (Copyright by RSA Data Security, Inc) 
Created 20100305   SAP 
Last change 20110908   SAP 
Shared Memory-enabled    
Fixed point arithmetic    
Unicode checks active    
Forward declarations
# Type group / Object type Type Type Description
1 ABAP Type group use (TYPE-POOLS tp)  Type group use (TYPE-POOLS tp)
Interfaces
Class CL_ABAP_HMAC has no interface implemented.
Friends
Class CL_ABAP_HMAC has no friend class.
Attributes
# Attribute Level Visibility Read only Typing Associated Type Initial Value Description Created on
1 CO_AB_IS_REQUESTED_C Constant Private Type reference (TYPE) C 'X' IsRequested 20100329
2 CO_AB_IS_REQUESTED_X Constant Private Type reference (TYPE) X 88 IsRequested 20100329
3 CO_AB_OPCODE_HMACBLOB Constant Private Type reference (TYPE) X 16 Calculate hash 20100329
4 CO_AB_OPCODE_MESSAGEDIGEST Constant Private Type reference (TYPE) X 15 Operation Code 20100329
5 CO_AB_STATE_DELETE Constant Private Type reference (TYPE) X 05 Delete 20100329
6 CO_AB_STATE_FINAL Constant Private Type reference (TYPE) X 03 Final status 20100329
7 CO_AB_STATE_INFO Constant Private Type reference (TYPE) X 04 Information 20100329
8 CO_AB_STATE_INIT Constant Private Type reference (TYPE) X 01 Initial status 20100329
9 CO_AB_STATE_UPDATE Constant Private Type reference (TYPE) X 02 Update Status 20100329
10 CO_USE_CDESTRUCTOR Constant Private Type reference (TYPE) C ' ' C Destructor 20100329
11 M_ALGORITHM Instance attribute Private Type reference (TYPE) STRING Name of the algorithm 20100329
12 M_DIGEST_LENGTH Instance attribute Private Type reference (TYPE) I Length of the digest in bytes 20100329
13 M_KEY Instance attribute Private Type reference (TYPE) XSTRING HMAC Key 20100329
14 M_POINTER Instance attribute Private Type reference (TYPE) %_C_POINTER Internal Information 20100329
Methods
# Method Level Visibility Method type Description Created on
1 CALCULATE_HMAC_FOR_CHAR Static method Public Method Generic HMAC function (char input) 20100329
2 CALCULATE_HMAC_FOR_RAW Static method Public Method Generic HMAC function (raw input) 20100329
3 CONSTRUCTOR Instance method Public Constructor CONSTRUCTOR 20100329
4 DESTRUCTOR Instance method Public Destructor C Destructor 20100329
5 EVAL_SYSRC Instance method Private Method Evaluation of sy-subrc 20100329
6 FINAL Instance method Public Method Ends the HMAC; last function for streams 20100329
7 GET_ALGORITHM Instance method Public Method Returns the name of the hash algorithm 20100329
8 GET_HMAC Instance method Public Method Returns the HMAC as an XString 20100329
9 GET_HMAC_LENGTH Instance method Public Method Returns the length of the HMAC in bytes 20100329
10 GET_INSTANCE Static method Public Method Generates an instance of the object 20100329
11 INIT Instance method Public Method Initializes the MAC with a key element 20100329
12 IS_EQUAL Static method Public Method Compares two HMACs for equality 20100329
13 RESET Instance method Public Method Resets the HMAC to initial status for new calculation 20100329
14 STRING_TO_XSTRING Static method Public Method Addnl function: convert string to XString for calculation 20100329
15 TO_BASE64 Instance method Public Method Returns the HMAC in base64 format 20100329
16 TO_STRING Instance method Public Method Returns the HMAC in string format 20100329
17 UPDATE Instance method Public Method Updates the HMAC based on the input data 20100329
Events
Class CL_ABAP_HMAC has no event.
Types
Class CL_ABAP_HMAC has no local type.
Method Signatures

Method CALCULATE_HMAC_FOR_CHAR Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EF_HMACB64STRING Call by reference Type reference (TYPE) STRING HMAC-Wert als Base64-Encoded String 20100329
2 Exporting EF_HMACSTRING Call by reference Type reference (TYPE) STRING HMAC-Wert als Hex-Encoded String 20100329
3 Exporting EF_HMACXSTRING Call by reference Type reference (TYPE) XSTRING HMAC-Wert binär als XString 20100329
4 Importing IF_ALGORITHM Call by reference Type reference (TYPE) STRING 'SHA1' Hash-Algorithmus 20100329
5 Importing IF_DATA Call by reference Type reference (TYPE) STRING Daten 20100329
6 Importing IF_KEY Call by reference Type reference (TYPE) XSTRING HMAC Key 20100329
7 Importing IF_LENGTH Call by reference Type reference (TYPE) I 0 Eingabelänge (0: strlen(data)) 20100329
# Exception Resumable Description Created on
1 CX_ABAP_MESSAGE_DIGEST Ausnahmeklasse für Message Digest 20100329

Method CALCULATE_HMAC_FOR_RAW Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EF_HMACB64STRING Call by reference Type reference (TYPE) STRING HMAC-Wert als Base64-Encoded String 20100329
2 Exporting EF_HMACSTRING Call by reference Type reference (TYPE) STRING HMAC-Wert als Hex-Encoded String 20100329
3 Exporting EF_HMACXSTRING Call by reference Type reference (TYPE) XSTRING HMAC-Wert binär als XString 20100329
4 Importing IF_ALGORITHM Call by reference Type reference (TYPE) STRING 'SHA1' Hash-Algorithmus 20100329
5 Importing IF_DATA Call by reference Type reference (TYPE) XSTRING Daten 20100329
6 Importing IF_KEY Call by reference Type reference (TYPE) XSTRING HMAC Key 20100329
7 Importing IF_LENGTH Call by reference Type reference (TYPE) I 0 Eingabelänge (0: strlen(data)) 20100329
# Exception Resumable Description Created on
1 CX_ABAP_MESSAGE_DIGEST Ausnahmeklasse für Message Digest 20100329

Method CONSTRUCTOR Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IF_ALGORITHM Call by reference Type reference (TYPE) STRING 20100329
2 Importing IF_KEY Call by reference Type reference (TYPE) XSTRING 20100329
# Exception Resumable Description Created on
1 CX_ABAP_MESSAGE_DIGEST Ausnahmeklasse für Message Digest 20100329

Method DESTRUCTOR Signature

Method DESTRUCTOR on class CL_ABAP_HMAC has no parameter.
Method DESTRUCTOR on class CL_ABAP_HMAC has no exception.

Method EVAL_SYSRC Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IF_RC Call by reference Type reference (TYPE) I 0 20100329
# Exception Resumable Description Created on
1 CX_ABAP_MESSAGE_DIGEST Ausnahmeklasse für Message Digest 20100329

Method FINAL Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EF_HMACB64STRING Call by reference Type reference (TYPE) STRING HMAC-Wert als Base64-Encoded String 20100329
2 Exporting EF_HMACSTRING Call by reference Type reference (TYPE) STRING HMAC-Wert als Hex-Encoded String 20100329
3 Exporting EF_HMACXSTRING Call by reference Type reference (TYPE) XSTRING HMAC-Wert binär als XString 20100329
4 Importing IF_DATA Call by reference Type reference (TYPE) XSTRING Daten 20100329
5 Importing IF_LENGTH Call by reference Type reference (TYPE) I 0 Eingabelänge (0: strlen(data)) 20100329
6 Importing IF_OFFSET Call by reference Type reference (TYPE) I 0 Offset der Eingabe (0: Beginn) 20100329
# Exception Resumable Description Created on
1 CX_ABAP_MESSAGE_DIGEST Ausnahmeklasse für Message Digest 20100329

Method GET_ALGORITHM Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Returning RF_ALGORITHM Value transfer Type reference (TYPE) STRING Algorithmus 20100329

Method GET_ALGORITHM on class CL_ABAP_HMAC has no exception.

Method GET_HMAC Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Returning ER_HMAC Value transfer Type reference (TYPE) XSTRING HMAC 20100329
# Exception Resumable Description Created on
1 CX_ABAP_MESSAGE_DIGEST Ausnahmeklasse für Message Digest 20100329

Method GET_HMAC_LENGTH Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Returning RI_LENGTH Value transfer Type reference (TYPE) I Länge 20100329
# Exception Resumable Description Created on
1 CX_ABAP_MESSAGE_DIGEST Ausnahmeklasse für Message Digest 20100329

Method GET_INSTANCE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IF_ALGORITHM Call by reference Type reference (TYPE) STRING 'SHA1' 20100329
2 Importing IF_KEY Call by reference Type reference (TYPE) XSTRING HMAC Key 20100329
3 Returning RO_OBJECT Value transfer Object reference (TYPE REF TO) CL_ABAP_HMAC HMAC Objekt 20100329
# Exception Resumable Description Created on
1 CX_ABAP_MESSAGE_DIGEST Ausnahmeklasse für Message Digest 20100329

Method INIT Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IF_KEY Call by reference Type reference (TYPE) XSTRING HMAC Key 20100329
# Exception Resumable Description Created on
1 CX_ABAP_MESSAGE_DIGEST Ausnahmeklasse für Message Digest 20100329

Method IS_EQUAL Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Returning ER_EQUAL Value transfer Type reference (TYPE) ABAP_BOOL True if Equal 20100329
2 Importing IF_HMACA Call by reference Type reference (TYPE) XSTRING First HMAC 20100329
3 Importing IF_HMACB Call by reference Type reference (TYPE) XSTRING Second HMAC 20100329

Method IS_EQUAL on class CL_ABAP_HMAC has no exception.

Method RESET Signature

Method RESET on class CL_ABAP_HMAC has no parameter.
# Exception Resumable Description Created on
1 CX_ABAP_MESSAGE_DIGEST Ausnahmeklasse für Message Digest 20100329

Method STRING_TO_XSTRING Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Returning ER_OUTPUT Value transfer Type reference (TYPE) XSTRING Ausgabewert 20100329
2 Importing IF_INPUT Call by reference Type reference (TYPE) STRING Eingabewert 20100329
# Exception Resumable Description Created on
1 CX_ABAP_MESSAGE_DIGEST Ausnahmeklasse für Message Digest 20100329

Method TO_BASE64 Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Returning ER_HMACB64STRING Value transfer Type reference (TYPE) STRING HMAC-Wert als Base64-Encoded String 20100329
# Exception Resumable Description Created on
1 CX_ABAP_MESSAGE_DIGEST Ausnahmeklasse für Message Digest 20100329

Method TO_STRING Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Returning ER_HMACSTRING Value transfer Type reference (TYPE) STRING HMAC-Wert als Hex-Encoded String 20100329
# Exception Resumable Description Created on
1 CX_ABAP_MESSAGE_DIGEST Ausnahmeklasse für Message Digest 20100329

Method UPDATE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IF_DATA Call by reference Type reference (TYPE) XSTRING Daten 20100329
2 Importing IF_LENGTH Call by reference Type reference (TYPE) I 0 Eingabelänge (0: strlen(data)) 20100329
3 Importing IF_OFFSET Call by reference Type reference (TYPE) I 0 Offset der Eingabe (0: Beginn) 20100329
# Exception Resumable Description Created on
1 CX_ABAP_MESSAGE_DIGEST Ausnahmeklasse für Message Digest 20100329
History
Last changed by/on SAP  20110908 
SAP Release Created in