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