HASH command for IBM i

This is example ILE RPG code to generate a hash over an IFS stream file. It supports MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes.

With this command, you can hash any stream file like this:

      HASH STMF('/path/to/myfile.ext') ALG(*SHA256)
  

The hash will be returned as a completion message, but since the code is provided, you could modify it to return the hash a different way (such as a parameter) if desired.

System Requirements
Download
 
Package Download File Size Format Platform
HASH *CMD hash.zip 14 KB Zipped Source IBM i V5R2