Currently it only works with 64-bit AHK.
As a non-programmer, it's a little harder to get into C++. I am always open for improvement suggestions or pull requests.
What it might look like:
Code: Select all
Hash := HashString(String [, Algorithm, HMAC])
Hash := HashFile(Filename [, Algorithm])
Algorithm
- MD2
- MD4
- MD5
- SHA1 (default)
- SHA256
- SHA384
- SHA512
Code: Select all
MsgBox HashString("The quick brown fox jumps over the lazy dog", "SHA256") ; -> D7A8FBB307D7809469CA9ABCB0082E4F8D5651E46D3CDB762D02D0BF37C9E592
MsgBox HashString("The quick brown fox jumps over the lazy dog", "MD5", "Secret") ; -> 5B9F81435A19FDFB0B23F68ED45979E4
MsgBox HashString("𤽜") ; -> 4701F6DEA7CFB096998E720DF86137837B63AD0F
MsgBox HashFile("test.txt", "SHA1") ; -> FC62C3F7F7838F4818BD45ED32ADD47EA20E32F6
Branch: https://github.com/jNizM/AutoHotkey/tree/hashing
Commits: https://github.com/jNizM/AutoHotkey/commits/hashing
C++ File: https://github.com/jNizM/AutoHotkey/blob/hashing/source/lib/crypt.cpp