Last change
on this file since 752 was 684, checked in by John Leo Zimmer, 15 years ago |
first commit from Glenwood
|
File size:
731 bytes
|
Line | |
---|
1 | XUSHSH ;;GpZ; - ; IMPROVED HASHING UTILITY: for Cache/Linux (VWHSHCLX); 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 | N PIPE,ZUT,I
|
---|
15 | S ZUT=$ZUTIL(68,40,1) ;; MSM-style End-of-File Handling
|
---|
16 | S PIPE=" echo "_X_"||"_SED_$P(HASHLIST,"||",3)_"gpg --print-md "_HASH
|
---|
17 | OPEN PIPE:"Q"
|
---|
18 | F I=1:1:4 USE PIPE R X Q:$ZEOF<0 S HASHOUT=$G(HASHOUT)_X
|
---|
19 | CLOSE PIPE
|
---|
20 | S ZUT=$ZUTIL(68,40,ZUT),X=HASHOUT
|
---|
21 | Q $TR(X," ")
|
---|
Note:
See
TracBrowser
for help on using the repository browser.