Last change
on this file since 1779 was 684, checked in by John Leo Zimmer, 15 years ago |
first commit from Glenwood
|
File size:
605 bytes
|
Rev | Line | |
---|
[684] | 1 | XUSHSH ;;GpZ; - ; IMPROVED HASHING UTILITY: GT.M Version (VWHSHGTM); 01/08/2010
|
---|
| 2 | V ;;8.0;KERNEL;;Jul 10, 1995
|
---|
| 3 | ;;
|
---|
| 4 | A S X=$$EN(X) Q
|
---|
| 5 | ;;
|
---|
| 6 | EN(X,HASH) ;;
|
---|
| 7 | N (X,HASH)
|
---|
| 8 | D:'$L($G(^%ZOSF("HASHLIST"))) DEFHASH^VWHSH0
|
---|
| 9 | S HASHLIST=^%ZOSF("HASHLIST")
|
---|
| 10 | S HASH=$S('$L($G(HASH)):$P(HASHLIST,"|",1),1:$TR(HASH,"abcdefghijklmnopqrstuvwxyz- ","ABCDEFGHIJKLMNOPQRSTUVWXYZ"))
|
---|
| 11 | IF HASH="LEGACY" QUIT $$EN^VWHSHLEG(X)
|
---|
| 12 | Q:HASHLIST'[(" "_HASH_" ") X
|
---|
| 13 | S SED="sed -e 's/$/\r/'|"
|
---|
| 14 | OPEN "PIPE":(COMM=SED_"gpg --print-md "_HASH)::"PIPE"
|
---|
| 15 | USE "PIPE" W X,! W /EOF
|
---|
| 16 | F R X Q:$ZEOF S HASHOUT=$G(HASHOUT)_X
|
---|
| 17 | CLOSE "PIPE"
|
---|
| 18 | Q $TR(HASHOUT," ")
|
---|
Note:
See
TracBrowser
for help on using the repository browser.