I rewrote the example and uploaded the actual example file.
It works. If you have question on how it works, or how to implement it properly, please post a question.
hey, I couldn't run any example... I don't know what's going on.
I wanted a script to input a string (a-z && 0-9) and it would return the SHA-256. it's possible?
I'm afraid not. I know I can eventually figure it out eventually.
I think there is an AutoHotkey.exe in the SciTE4ahk folder. If you replace it with ahk v2 exe, that should work (save/backup the original)
But I'm not sure if the rest of SciTE4ahk would work as expected. The debugging parts are also written in v1. I'm not sure how using a v2 exe would work with all that.
I would suggest you use Notepad++ with DebugView++
I'm afraid not. I know I can eventually figure it out eventually.
I think there is an AutoHotkey.exe in the SciTE4ahk folder. If you replace it with ahk v2 exe, that should work (save/backup the original)
But I'm not sure if the rest of SciTE4ahk would work as expected. The debugging parts are also written in v1. I'm not sure how using a v2 exe would work with all that.
I would suggest you use Notepad++ with DebugView++
I find this setup to be more flexible and simple when using ahk v1 / v2 ... but ya gotta find our own preference really.
How are you running v2 scripts now normally? Other than in debugging?
I only worked with v1 scripts, but I was studying hashing, I searched here on the forum about SHA-256 and I wanted to test your script to learn how it works
I'm kind of confused, but later I'll try to use notepad++.
I have it installed here
If you use v1 and v2 like me you need to use the portability of AutoHotkey or use (e.g.) .ah2 as file extension and add reg entries for it.
Or you can still use my v1 version of hashing.
I really like your func because it's easy to understand, but it also has a few problems:
* string hash returns wrong value
exam: hash("Hello","SHA1")
=> 7AC231DEBC3AE0E6A5CD9908F681B1D6041E84C2
but it should be
F7FF9E8B7BB2E09B70935A5D785E0CC5D9D0ABF0
* hash(val,"SHA256") ok but hash(,"SHA256") returns wrong value
* Files larger than 4GB are not supported