|
I use a routine to get sha1, changing the "HashAlgoritm will give you
sha256. (find _CIPER)
// Return a SHA 1 as a 40-byte character value (hex) - input in
EBCDIC
PSHA1 B Export
DSHA1 PI 40
D parmInput 32000 Options(*VarSize) Const Varying
HashAlgorithm = x'01';
HashWorkArea = *LOVAL;
DataLength=%Len(parmInput);
Input=parmInput;
Translate(DataLength: Input: 'QTCPASC');
Cipher(%Addr(ptrOutput):
%Addr(dsControls):
%Addr(ptrInput));
// Convert hash string to character
cvthc(OutputHex:
Output:
%Size(OutputHex));
Return %xlate('ABCDEF': 'abcdef': OutputHex);
PSHA1 E
// procedure to call MI
DCipher PR EXTPROC('_CIPHER') D
* VALUE D * VALUE D
* VALUE
On Tue, Mar 27, 2018 at 10:12 AM, <broehmer@xxxxxxxxxxxxxxx> wrote:
Hi All,
I've a need to either change or find a program that does what Scott
Klement's program MD5R4 that creates a SHA1 hash to SHA256.
Anybody know what can be donewith
Scott's program
to make it work?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.