Radix Posted November 8, 2022 Share Posted November 8, 2022 (edited) Greetings! I'm having trouble calculating the HMAC, more precisely when I try to do it through the GUI interface. The CLI interface works and is even OpenSSL compliant, but there is something wrong reading the secret key or the target file on the GUI, which modifies the result. I can't identify the error, it just doesn't work. Help please! thanks in advace HMACCLI.au3 cmdline.au3 HMACGUI.au3 Edited November 8, 2022 by Radix Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 8, 2022 Moderators Share Posted November 8, 2022 Moved to the appropriate AutoIt General Help and Support forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Radix Posted November 8, 2022 Author Share Posted November 8, 2022 (edited) Greetings! I'm having trouble calculating the HMAC, more precisely when I try to do it through the GUI interface. The CLI interface works and is even OpenSSL compliant, but there is something wrong reading the secret key or the target file on the GUI, which modifies the result. I can't identify the error, it just doesn't work. Help please! thanks in advace HMACCLI.au3 cmdline.au3 HMACGUI.au3 Edited November 8, 2022 by Radix Link to comment Share on other sites More sharing options...
Radix Posted November 8, 2022 Author Share Posted November 8, 2022 I'm sorry. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 8, 2022 Moderators Share Posted November 8, 2022 (edited) No worries, @Radix it happens And no need to create another, I have merged the two. Edited November 8, 2022 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
TheXman Posted November 8, 2022 Share Posted November 8, 2022 (edited) 1 hour ago, Radix said: I'm having trouble calculating the HMAC, more precisely when I try to do it through the GUI interface. Case $idCalculate $sSecret = "" $Full = FileRead(GUICtrlRead($idInput)) $dHash = _HashHMAC($iAlgorithm, $Full, $sSecret); Create a hash of the file. GUICtrlSetData($idHashLabel, $dHash) ; Set the hash digest label with the hash data. Do you think it might have something to do with the fact that you don't set $sSecret before calling _HashHMAC()? Edited November 8, 2022 by TheXman CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman Link to comment Share on other sites More sharing options...
Solution Radix Posted November 8, 2022 Author Solution Share Posted November 8, 2022 No, sorry. I wrote this line to test null key. I realized it wasn't working because I'm just running the script in Scite, instead of compiling, when there was already a compiled binary in the directory, that was probably causing the bug..It works fine like this: (OpenSSL compliant) gui.au3 Link to comment Share on other sites More sharing options...
Radix Posted November 8, 2022 Author Share Posted November 8, 2022 Now that I'm properly intoxicated, I realize what a mess I've caused. It works perfectly and I hope it will be useful to someone. Visit: http://albanese.atwebpages.com/projects.php Cheers! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now