Crypto-Blue: Hasher Node

image

The Hasher node is used to generate SHA payload hashes and hashed message authentication codes. The following properties can be configured for the node:

  • Function: The node's functions, choices include:

    • Generate Hash
    • Generate HMAC
    • Verify Hash
    • Verify HMAC
  • Hash Size: The output hash size can be configured in the node's edit dialog, options include 256 bit (SHA256), 384 bit (SHA384) and 512 bit (SHA512).

  • HMAC: The hmac key is also configured in the node's edit dialog, but it can also be defined in the msg.key field of the injection message.

  • Verification: In order to verify a hashed payload, this must either be provided in the verification property of the node's edit dialog or in the msg.verification field of the injection message.

[{"id":"5443d85005faa87a","type":"inject","z":"d4703d9e2676369d","name":"Hash Injector","props":[{"p":"payload"},{"p":"verification","v":"a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Hello World","payloadType":"str","x":170,"y":580,"wires":[["85420e3c17146a89","5b37225f13f7b84d"]]},{"id":"85420e3c17146a89","type":"hasher","z":"d4703d9e2676369d","name":"","function":"Generate Hash","hashSize":"SHA256","hmacKey":"","verification":"","x":360,"y":560,"wires":[["7efaef752a58475c"]]},{"id":"7efaef752a58475c","type":"debug","z":"d4703d9e2676369d","name":"Print Payload Result","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":640,"y":640,"wires":[]},{"id":"5b37225f13f7b84d","type":"hasher","z":"d4703d9e2676369d","name":"","function":"Verify Hash","hashSize":"SHA256","hmacKey":"","verification":"","x":350,"y":600,"wires":[["7efaef752a58475c"]]},{"id":"7f4461a8f9abea69","type":"inject","z":"d4703d9e2676369d","name":"HMAC Injector","props":[{"p":"payload"},{"p":"key","v":"SecretKey","vt":"str"},{"p":"verification","v":"50082da69e7e4780c867be198e795b9cd5e94e739ee9485aa95a70f60e36e73f","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Hello World","payloadType":"str","x":180,"y":680,"wires":[["e347159f8bac216f","206bca76e7230862"]]},{"id":"e347159f8bac216f","type":"hasher","z":"d4703d9e2676369d","name":"","function":"Generate HMAC","hashSize":"SHA256","hmacKey":"","verification":"","x":360,"y":660,"wires":[["7efaef752a58475c"]]},{"id":"206bca76e7230862","type":"hasher","z":"d4703d9e2676369d","name":"","function":"Verify HMAC","hashSize":"SHA256","hmacKey":"","verification":"","x":350,"y":700,"wires":[["7efaef752a58475c"]]}]

Collection Info

Flow Info

Created 2 years, 7 months ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • debug (x1)
  • inject (x2)
Other

Tags

  • node-red
  • crypto-blue
  • blue-sec
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option