I know that MHASH is free library which contains many hash algorithms to get hash code. In my current program 3 dynamic calls goes to MHASH to invoke SHA-1 hash algorithm.The requirement is to invoke SHA-256.i.e. currently the output is 24bit, but i should make changes to get 32bit. If anybody have come across such a scenario please enrich with some essential data. How to invoke SHA-256 hash algorithm which exists in MHASH library from COBOL?
If the query is not clear please let me know...
You probably need to consult your MHASH documentation to find the answers; possibly post to the MHASH developers board?
The requirement is to invoke SHA-256.i.e. currently the output is 24bit, but i should make changes to get 32bit
I especially do not understand what you mean by this, since SHA-1 generates 160 output bits and SHA-256 generates 256 output bits; if you're cutting down the output to 24 bits then you're really messing up the algorithm. If you're referring to a 24-bit load module that needs to go to 31-bits (note that 32-bit load modules don't exist per se on z/OS systems, just 31-bits due to the architecture), then you're going to run into problems calling the 24-bit MHASH routine using addresses that MHASH cannot access.
if this is the case how does this thread relate to mainframe cobol...
the infrastucture of mhash is provided for C language programs
to invoke it from a mainframe non USS cobol looks not trivial
it implies quite bit of skills and a lot of work being done
if it has been done You might probably get more help from the people
who installed mhash in Your environment rather than from a public/generic cobol forum