source: hash/trunk/VWHSHGTM.m@ 809

Last change on this file since 809 was 684, checked in by John Leo Zimmer, 15 years ago

first commit from Glenwood

File size: 605 bytes
Line 
1XUSHSH ;;GpZ; - ; IMPROVED HASHING UTILITY: GT.M Version (VWHSHGTM); 01/08/2010
2V ;;8.0;KERNEL;;Jul 10, 1995
3 ;;
4A S X=$$EN(X) Q
5 ;;
6EN(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.