Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / crypto / external / bsd / netpgp / dist / bindings / python / netpgp.py
blob7112e7d4ae18d6b63e260666ad6b86f0b2a63512
1 #! /usr/bin/env python2.5
3 # netpgp bindings for python
4 import _netpgppython
6 # initialisations
7 n = _netpgppython.new_netpgp_t()
8 _netpgppython.netpgp_setvar(n, "homedir", "/home/agc/.gnupg")
9 _netpgppython.netpgp_setvar(n, "hash", "SHA256")
10 _netpgppython.netpgp_init(n)
12 userid = _netpgppython.netpgp_getvar(n, "userid")
13 _netpgppython.netpgp_sign_file(n, userid, "a", "a.gpg", 0, 0, 0)
14 _netpgppython.netpgp_verify_file(n, "a.gpg", "/dev/null", 0)