ebfedea0ce
- crypto/external/bsd/heimdal - crypto/external/bsd/libsaslc - crypto/external/bsd/netpgp - crypto/external/bsd/openssl Change-Id: I91dbf05f33e637edf5b9bb408d5baddd7ba8cf75
16 lines
447 B
Python
Executable file
16 lines
447 B
Python
Executable file
#! /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)
|
|
|