Would be helpful to be able to specify an output encoding for all hashing identifiers.
Currently to use non-hex encoding we have to:
- hash
- loop over result converting to decimal
- store each converted value in a bvar
- convert bvar to desired encoding
Which can be quite a bit of overhead to undo something mIRC is doing by default
I propose supporting mime/base64 encoding natively and an option to output the result to a bvar similar to the way $encode/encode work
$sha256(input, [N]oN, &output)
N = 0: input is plain text
N = 1: input is bvar
N = 2: input is filename
o0: Output should not be encoded
o1: Output should be hex encoded (default)
o2: Output should be mime/base64 encoded
&output: bvar to store the result in
if specified, the number of bytes wrote to the bvar is returned
The bvar is cleared before the result is output into it
* $sha256 used as an example