started with py crypto, enhanced raw.py generation, better autoconf integration

This commit is contained in:
git@daemon.de
2014-12-22 16:22:52 +01:00
parent 28a0405d55
commit 45c5daae54
11 changed files with 496 additions and 150 deletions

View File

@@ -3,16 +3,20 @@
from pypcp import *
from pprint import pprint
sk = Key("tom", "me@there")
sk.dump()
zbobsec = open("../../tests/key-bobby-sec", "r").read()
encoded = open("../../tests/key-bobby-sec", "r").read()
bobsec = Key(encoded=zbobsec, passphrase="b")
#bobsec.dump()
sk = Key(encoded=encoded, passphrase="b")
sk.dump()
zalipub = open("../../tests/key-alicia-pub", "r").read()
alipub = PublicKey(encoded=zalipub)
#alipub.dump()
p = open("../../tests/key-bobby-pub", "r").read()
pk = PublicKey(encoded=p)
pk.dump()
ctx = Context()
encrypted = ctx.encrypt(string="hello world", passphrase="x")
ctx.addkey(bobsec)
ctx.recipients(alipub)
encrypted = ctx.encrypt(string="hello world")
pprint(pk.masterpub)