Hello everybody,
I'm trying to get the string representation of the hmac_md5 function found in the workato SDK functions.
The way I'm using it is like so:
vendor_code = input['vendor_code'] secret_key = input['secret_key'] request_time = now.utc.strftime("%Y-%m-%d %H:%M:%S") contactenated = vendor_code.length.to_s + vendor_code.to_s + request_time.length.to_s + request_time + request_time.to_s hash_hmac = contactenated.hmac_md5(secret_key) header = "code=\""+vendor_code+"\" date=\""+request_time+"\" hash=\""+hash_hmac + "\"" {x_avangate_authetication_header: hash_hmac }
But the value I'm getting back is
{ header: X-Avangate-Authentication, value: 0x8d1e4a67056622c900bcd913ef114927 },
I can only assume that it returns a hex value, but I have no way of checking that.
I also tried using the decode_hex function from the whitelisted SDK methods, but no luck on that either.
Normally I'd expect to get back something like this
code="250111206876" date="2020-07-15 13:45:02" hash="48c51eb6c55ceb7e313e6dfe5cb74178"
I'm not entirely sure how to proceed from here. Any pointing in the right direction is appreciated.
Send us a ticket, we will try our best to assist you with your problem
Catalin Adam
How to get string representation of hmac_md5?
Hello everybody,
I'm trying to get the string representation of the hmac_md5 function found in the workato SDK functions.
The way I'm using it is like so:
But the value I'm getting back is
I can only assume that it returns a hex value, but I have no way of checking that.
I also tried using the decode_hex function from the whitelisted SDK methods, but no luck on that either.
Normally I'd expect to get back something like this
I'm not entirely sure how to proceed from here. Any pointing in the right direction is appreciated.