Forum Discussion
DavidW_20496
Nimbostratus
Feb 24, 2015HMAC Question
F5 posted an example for generating an HMAC based on sha256
https://devcentral.f5.com/wiki/iRules.HMAC.ashx
In the line 31 there is
set token [sha256 $opad[sha256 "${ipad}${message}"]]
...
DavidW_20496
Nimbostratus
Mar 01, 2015Thanks. Yep found some comment that tcl treats byte arrays as strings.
Am now questioning whether the the HmacSha256 is actually quite to spec. It doesn't pad the key if the key is less than the block length but then does pad the ipad and opad, but with 6 and . This doesn't look like it is doing this to standard, but may be the equivalent.
Anyway, doesn't matter for me I don't need a super secure Hmac, and can save cycles by doing something simpler just using the built in sha256.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
