Jeff:
I just ran this on UD v7.2.7 on Windows 2008 R2 server and UD v7.1.9 on
a Windows 2003 server:
3 Dev (0)-> BPTEST X.DATA = '1234567' ; X.ERROR = DIGEST ( 'SHA1',
X.DATA, 1, X.OUT ) ; CRT 'DIGEST err = ' : X.ERROR ; X.RESULT = OCONV (
X.OUT, 'MX' ) ; CRT 'OCONV res = ' : X.RESULT ; END
Compiling Unibasic: SAVEDLISTS\BpTest_523735291 in mode 'p'.
compilation finished
DIGEST err = 0
OCONV res = 20EABE5D64B0E216796E834F52D61FD0B70332FC
It seems to work fine for me (assuming the hex output is correct). :-)
HTH,
Bill
------------------------------------------------------------------------
Jeffrey Butera said the following on 9/20/2010 12:44 PM:
Unidata 7.2.5 on RedHat 5.
I'm trying to SHA1 some data and get it back with some human readable
output (hex is fine). This snippet works for other Unidata people
(who have emailed me privately) but not me:
X.DATA = '1234567'
X.ERROR=DIGEST('SHA1',X.DATA,1,X.OUT)
CRT 'DIGEST err=':X.ERROR
X.RESULT = OCONV(X.OUT, "MX")
CRT 'OCONV res=':X.RESULT
Instead of giving me a nice hash result, I get binary output:
DIGEST err=0
OCONV res=ê¾]d°âynORÖз2ü
I'm trying to determine why this would cause problems on my server
but not for others.
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users