1*ebfedea0SLionel Sambuc#! /usr/bin/env python2.5 2*ebfedea0SLionel Sambuc 3*ebfedea0SLionel Sambuc# netpgp bindings for python 4*ebfedea0SLionel Sambucimport _netpgppython 5*ebfedea0SLionel Sambuc 6*ebfedea0SLionel Sambuc# initialisations 7*ebfedea0SLionel Sambucn = _netpgppython.new_netpgp_t() 8*ebfedea0SLionel Sambuc_netpgppython.netpgp_setvar(n, "homedir", "/home/agc/.gnupg") 9*ebfedea0SLionel Sambuc_netpgppython.netpgp_setvar(n, "hash", "SHA256") 10*ebfedea0SLionel Sambuc_netpgppython.netpgp_init(n) 11*ebfedea0SLionel Sambuc 12*ebfedea0SLionel Sambucuserid = _netpgppython.netpgp_getvar(n, "userid") 13*ebfedea0SLionel Sambuc_netpgppython.netpgp_sign_file(n, userid, "a", "a.gpg", 0, 0, 0) 14*ebfedea0SLionel Sambuc_netpgppython.netpgp_verify_file(n, "a.gpg", "/dev/null", 0) 15*ebfedea0SLionel Sambuc 16