t/t-bytes.py: Check that indexing, slicing, etc. return `C.ByteString'.
[catacomb-python] / algorithms.py
index 0fa434a..5730c45 100644 (file)
@@ -25,6 +25,8 @@ serpent noekeon
 '''.split()
 pmodes = '''
 ecb cbc cfb ofb counter
+cmac pmac1
+ccm eax gcm ocb1 ocb3
 '''.split()
 streamciphers = '''
 rc4 seal
@@ -37,7 +39,7 @@ chacha20 chacha12 chacha8
 chacha20-ietf chacha12-ietf chacha8-ietf
 xchacha20 xchacha12 xchacha8
 '''.split()
-streamciphers += map(lambda s: s.translate(None, '/'), latindances)
+streamciphers += map(lambda s: s.replace('/', ''), latindances)
 hashes = '''
 md2 md4 md5 tiger has160
 sha sha224 sha256 sha512/224 sha512/256 sha384 sha512
@@ -94,7 +96,7 @@ for i in latindances:
   if i.endswith('-ietf'): root += '_ietf'
   print ('\t_("%(name)s", %(root)s_keysz, %(id)s_rand, ' +
          'RNG_LATIN, %(ROOT)s_NONCESZ) \\') % \
-      {'name': i, 'id': i.translate(None, '/').replace('-', '_'),
+      {'name': i, 'id': i.replace('/', '').replace('-', '_'),
        'root': root, 'ROOT': root.upper()}
 for i in [128, 256]:
   print ('\t_("shake%(w)d", shake%(w)d_keysz, cshake%(w)d_rand, ' +