Ejemplo n.º 1
0
 def __init__(self, *args):
     this = _netpgppython.new_netpgp_t(*args)
     try:
         self.this.append(this)
     except:
         self.this = this
Ejemplo n.º 2
0
#! /usr/bin/env python2.5

# netpgp bindings for python
import _netpgppython

# initialisations
n = _netpgppython.new_netpgp_t()
_netpgppython.netpgp_setvar(n, "homedir", "/home/agc/.gnupg")
_netpgppython.netpgp_setvar(n, "hash", "SHA256")
_netpgppython.netpgp_init(n)

userid = _netpgppython.netpgp_getvar(n, "userid")
_netpgppython.netpgp_sign_file(n, userid, "a", "a.gpg", 0, 0, 0)
_netpgppython.netpgp_verify_file(n, "a.gpg", "/dev/null", 0)