You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Another idea, what do you think about introducing a factory class eg class ZCL_AES_FACTORY with 2 methods:
CREATE_MODE returns reference to ZIF_AES_MODE
would implement the functinoallity from ZCL_AES_UTILITY=>GET_AES_MODE
CREATE_PADDING returns reference to new interface ZIF_AES_PADDING
would implement the same as methods GET_BYTE_PADDING_UTILITY + VALIDATE_PADDING_STANDARD from ZCL_BYTE_PADDING_UTILITY, making it easy to change ZCL_BYTE_PADDING_UTILITY to an interface instead
and the singleton functionallity from ZCL_AES_UTILITY=>GET_PADDING_UTILITY
This would also change ENCRYPT_XSTRING so it takes a reference to ZIF_AES_MODE and ZIF_AES_PADDING instead of the constants.
Advantages:
The responsibility for creating objects are moved to a new class
ZCL_BYTE_PADDING_UTILITY is changed to an interface instead of a superclass, which will make it similar to ZIF_AES_MODE
ENCRYPT_XSTRING will take references to objects, which will make it easier to test new padding logic and modes
The text was updated successfully, but these errors were encountered:
Hi,
Another idea, what do you think about introducing a factory class eg class ZCL_AES_FACTORY with 2 methods:
CREATE_MODE returns reference to ZIF_AES_MODE
CREATE_PADDING returns reference to new interface ZIF_AES_PADDING
This would also change ENCRYPT_XSTRING so it takes a reference to ZIF_AES_MODE and ZIF_AES_PADDING instead of the constants.
Advantages:
The text was updated successfully, but these errors were encountered: