Thanks Yaron,

I'm not worried about security because I plan to use it on non-critical internal processes, but anyway I've done some research and here is an example using SHA-256:

Set encryptedValue = ##class(%SYSTEM.Encryption).SHAHashStream(256,stream)

The first parameter (in my case the value 256) refers to the bit-length:

160 (SHA-1)
224 (SHA-224)
256 (SHA-256)
384 (SHA-384)
512 (SHA-512)