xref: /minix3/crypto/external/bsd/netpgp/dist/bindings/tcl/netpgp.tcl (revision ebfedea0ce5bbe81e252ddf32d732e40fb633fae)
1*ebfedea0SLionel Sambuc#! /usr/bin/env tclsh
2*ebfedea0SLionel Sambuc
3*ebfedea0SLionel Sambuc# netpgp bindings for tcl
4*ebfedea0SLionel Sambuc
5*ebfedea0SLionel Sambucload libnetpgptcl.so
6*ebfedea0SLionel Sambuc
7*ebfedea0SLionel Sambuc# initialisations
8*ebfedea0SLionel Sambucset n [new_netpgp_t]
9*ebfedea0SLionel Sambucnetpgp_setvar $n "homedir" "/home/agc/.gnupg"
10*ebfedea0SLionel Sambucnetpgp_setvar $n "hash" "SHA256"
11*ebfedea0SLionel Sambucnetpgp_init $n
12*ebfedea0SLionel Sambuc
13*ebfedea0SLionel Sambucset userid [netpgp_getvar $n "userid"]
14*ebfedea0SLionel Sambucnetpgp_sign_file $n $userid "a" "a.gpg" 0 0 0
15*ebfedea0SLionel Sambucnetpgp_verify_file $n "a.gpg" "/dev/null" 0
16