Hi!
I have a Python script that I would like to integrate into Node-RED. Essentially, it signs a message with HMAC/SHA256.
So far, I've attempted to implement Crypto-JS to create a function in Node-RED. However, this approach isn't very flexible if I want to share the flow with others and also I'havent succeed
Perhaps someone has created a similar example using a third-party flow and can assist or guide me through the process.
def mymessagesigned(mysecret, message, randomh):
random_header_bytes = randomh.encode('utf-8')
shared_secret_bytes = mysecret.encode('utf-8')
signature = hmac.new(shared_secret_bytes, digestmod=hashlib.sha256)
signature.update(random_header_bytes)
signature.update(message.encode('utf-8'))
return signature.hexdigest()
thank you