The hash_encoding parameters accepts “base64” or “hex”. If you set it to null or an empty string, it defaults to base64. If you set it to any other non-empty string, it will return the following error: must be “base64” or “hex”.
Hi Arnold, I didn’t know that function even existed. But I checked, and you can do something similar with the function. The first parameter is 1, 256, or 512 for the SHA type. The second parameter is the optional encoding name, and the third is base64 or hex. For example:
“test”.tohash(256,string:getnull(),“hex”)
Beware that this function does not have an implementation in SQL, which means the hash is always calculated in the web application. This also means that if you were to use it in the Where or the Sort of a query, things will get really slow because all data will need to be fetched from the database first.