### Symmetric encryption.
class _tmp:
- def encrypt(me, n, m, tsz = None, h = ByteString('')):
+ def encrypt(me, n, m, tsz = None, h = ByteString.zero(0)):
if tsz is None: tsz = me.__class__.tagsz.default
e = me.enc(n, len(h), len(m), tsz)
if not len(h): a = None
c0 = e.encrypt(m)
c1, t = e.done(aad = a)
return c0 + c1, t
- def decrypt(me, n, c, t, h = ByteString('')):
+ def decrypt(me, n, c, t, h = ByteString.zero(0)):
d = me.dec(n, len(h), len(c), len(t))
if not len(h): a = None
else: a = d.aad().hash(h)