chiark / gitweb /
bytestring.c, catacomb/__init__.py: Introduce and use `zero' method.
[catacomb-python] / catacomb / __init__.py
index 860cfb5e07cd3d119a45771fed15068b360fd572..d4eac309ea67c96589da77afc079815d89acb737 100644 (file)
@@ -56,7 +56,8 @@ def _init():
   for i in b:
     if i[0] != '_':
       d[i] = b[i];
-  for i in ['MP', 'GF', 'Field',
+  for i in ['ByteString',
+            'MP', 'GF', 'Field',
             'ECPt', 'ECPtCurve', 'ECCurve', 'ECInfo',
             'DHInfo', 'BinDHInfo', 'RSAPriv', 'BBSPriv',
             'PrimeFilter', 'RabinMiller',
@@ -738,7 +739,7 @@ _augment(KCDSAPriv, _tmp)
 X25519_BASE = MP(9).storel(32)
 X448_BASE = MP(5).storel(56)
 
-Z128 = bytes('00000000000000000000000000000000')
+Z128 = ByteString.zero(16)
 
 class _BoxyPub (object):
   def __init__(me, pub, *args, **kw):