diff options
Diffstat (limited to 'robotframework-onap/ONAPLibrary/Base64Keywords.py')
-rw-r--r-- | robotframework-onap/ONAPLibrary/Base64Keywords.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/robotframework-onap/ONAPLibrary/Base64Keywords.py b/robotframework-onap/ONAPLibrary/Base64Keywords.py new file mode 100644 index 0000000..a87a4b9 --- /dev/null +++ b/robotframework-onap/ONAPLibrary/Base64Keywords.py @@ -0,0 +1,19 @@ +from robot.api.deco import keyword +import base64 + + +class Base64Keywords(object): + """ Utilities useful for generating UUIDs """ + + def __init__(self): + super(Base64Keywords, self).__init__() + + @keyword + def base64_encode(self, string_to_encode): + """generate a base64 encoded string""" + return base64.b64encode(self, string_to_encode) + + @keyword + def base64_decode(self, string_to_decode): + """decode a base64 encoded string""" + return base64.b64decode(self, string_to_decode) |