diff --git a/python-sync-actions/src/user_functions.py b/python-sync-actions/src/user_functions.py index 38c14ed..bf88690 100644 --- a/python-sync-actions/src/user_functions.py +++ b/python-sync-actions/src/user_functions.py @@ -88,6 +88,22 @@ def hash_hmac(self, algorithm, key, message): return stdout + def hash(self, algorithm, message): + """ + Execute PHP hash function + Args: + algorithm: + message: + + Returns: + + """ + + command = f"php -r 'echo hash(\"{algorithm}\", \"{message}\");'" + stdout, stderr = perform_shell_command(command, 'hash function') + + return stdout + def time(self): return int(time.time())