The results of calling the StringUtils Hash action are unexpected, partly because it's poorly documented.
In my case, when I used this action with any value (String with a length of a 100 characters) and a length of 64. it returned a String with a length of 128 characters of which the last 64 were all zeros. When calling it with a length of 32, it returned a String of 64 characters. When calling it with a length of less than 32, an error occurred, saying the length should be at least 32. The function of the length parameter is very confusing.
The documentation of the action itself says:
Hashes a value using the SHA-256 hash algorithm.
- value : the value to hash
- length : the desired length of the hash.
Returns a SHA-256 hash of 'value', with length 'length'
The official documentation doesn't add any detail to that.
The results of calling the StringUtils Hash action are unexpected, partly because it's poorly documented.
In my case, when I used this action with any value (String with a length of a 100 characters) and a length of 64. it returned a String with a length of 128 characters of which the last 64 were all zeros. When calling it with a length of 32, it returned a String of 64 characters. When calling it with a length of less than 32, an error occurred, saying the length should be at least 32. The function of the length parameter is very confusing.
The documentation of the action itself says:
The official documentation doesn't add any detail to that.