chiark / gitweb /
*.c: Reformat docstrings.
[catacomb-python] / algorithms.c
index 886c159106f7fbba57c5de46975748f0e2cde0c2..d190a08ba15b71d80ac9f233d33944f5cebb2cf8 100644 (file)
@@ -216,7 +216,7 @@ static PyObject *ksget_max(PyObject *me, void *hunoz)
 static PyMemberDef keysz_pymembers[] = {
 #define MEMBERSTRUCT keysz_pyobj
 #define default dfl /* ugh! */
-  MEMBER(default, T_INT, READONLY, "KSZ.default -> default key size")
+  MEMBER(default, T_INT,  READONLY, "KSZ.default -> default key size")
 #undef default
 #undef MEMBERSTRUCT
   { 0 }
@@ -224,33 +224,33 @@ static PyMemberDef keysz_pymembers[] = {
 
 static PyGetSetDef keyszany_pygetset[] = {
 #define GETSETNAME(op, name) ka##op##_##name
-  GET  (min,                   "KSZ.min -> smallest allowed key size")
-  GET  (max,                   "KSZ.max -> largest allowed key size")
+  GET  (min,           "KSZ.min -> smallest allowed key size")
+  GET  (max,           "KSZ.max -> largest allowed key size")
 #undef GETSETNAME
   { 0 }
 };
 
 static PyMemberDef keyszrange_pymembers[] = {
 #define MEMBERSTRUCT keyszrange_pyobj
-  MEMBER(min, T_INT, READONLY, "KSZ.min -> smallest allowed key size")
-  MEMBER(max, T_INT, READONLY, "KSZ.max -> largest allowed key size")
-  MEMBER(mod, T_INT, READONLY,
-        "KSZ.mod -> key size must be a multiple of this")
+  MEMBER(min,  T_INT,    READONLY, "KSZ.min -> smallest allowed key size")
+  MEMBER(max,  T_INT,    READONLY, "KSZ.max -> largest allowed key size")
+  MEMBER(mod,  T_INT,    READONLY,
+                           "KSZ.mod -> key size must be a multiple of this")
 #undef MEMBERSTRUCT
   { 0 }
 };
 
 static PyGetSetDef keyszset_pygetset[] = {
 #define GETSETNAME(op, name) ks##op##_##name
-  GET  (min,                   "KSZ.min -> smallest allowed key size")
-  GET  (max,                   "KSZ.max -> largest allowed key size")
+  GET  (min,           "KSZ.min -> smallest allowed key size")
+  GET  (max,           "KSZ.max -> largest allowed key size")
 #undef GETSETNAME
   { 0 }
 };
 
 static PyMemberDef keyszset_pymembers[] = {
 #define MEMBERSTRUCT keyszset_pyobj
-  MEMBER(set, T_OBJECT, READONLY,      "KSZ.set -> allowed key sizes")
+  MEMBER(set,  T_OBJECT, READONLY, "KSZ.set -> allowed key sizes")
 #undef MEMBERSTRUCT
   { 0 }
 };
@@ -280,7 +280,7 @@ static PyTypeObject keysz_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Key size constraints.  Abstract.",
+  "Key size constraints.  Abstract.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -328,8 +328,8 @@ static PyTypeObject keyszany_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"KeySZAny(DEFAULT)\n\
-  Key size constraints.  This object imposes no constraints on size.",
+  "KeySZAny(DEFAULT)\n"
+  "  Key size constraints.  This object imposes no constraints on size.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -377,9 +377,9 @@ static PyTypeObject keyszrange_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"KeySZRange(DEFAULT, [min = 0], [max = 0], [mod = 1])\n\
-  Key size constraints.  Key size must be between MIN and MAX inclusive,\n\
-  and be a multiple of MOD.",
+  "KeySZRange(DEFAULT, [min = 0], [max = 0], [mod = 1])\n"
+  "  Key size constraints: size must be between MIN and MAX inclusive, and\n"
+   be a multiple of MOD.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -427,8 +427,8 @@ static PyTypeObject keyszset_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"KeySZSet(DEFAULT, SEQ)\n\
-  Key size constraints.  Key size must be DEFAULT or one in SEQ.",
+  "KeySZSet(DEFAULT, SEQ)\n"
+  "  Key size constraints: size must be DEFAULT or an element of SEQ.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -629,21 +629,21 @@ end:
 
 static PyGetSetDef gccipher_pygetset[] = {
 #define GETSETNAME(op, name) gcc##op##_##name
-  GET  (keysz,                 "CC.keysz -> acceptable key sizes")
-  GET  (blksz,                 "CC.blksz -> block size, or zero")
-  GET  (name,                  "CC.name -> name of this kind of cipher")
+  GET  (keysz,         "CC.keysz -> acceptable key sizes")
+  GET  (blksz,         "CC.blksz -> block size, or zero")
+  GET  (name,          "CC.name -> name of this kind of cipher")
 #undef GETSETNAME
   { 0 }
 };
 
 static PyMethodDef gcipher_pymethods[] = {
 #define METHNAME(name) gcmeth_##name
-  METH (encrypt,               "C.encrypt(PT) -> CT")
-  METH (enczero,               "C.enczero(N) -> CT")
-  METH (decrypt,               "C.decrypt(CT) -> PT")
-  METH (deczero,               "C.deczero(N) -> PT")
-  METH (setiv,                 "C.setiv(IV)")
-  METH (bdry,                  "C.bdry()")
+  METH (encrypt,       "C.encrypt(PT) -> CT")
+  METH (enczero,       "C.enczero(N) -> CT")
+  METH (decrypt,       "C.decrypt(CT) -> PT")
+  METH (deczero,       "C.deczero(N) -> PT")
+  METH (setiv,         "C.setiv(IV)")
+  METH (bdry,          "C.bdry()")
 #undef METHNAME
   { 0 }
 };
@@ -673,7 +673,7 @@ static PyTypeObject gccipher_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Symmetric cipher metaclass.",
+  "Symmetric cipher metaclass.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -721,7 +721,7 @@ static PyTypeObject gcipher_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Symmetric cipher, abstract base class.",
+  "Symmetric cipher, abstract base class.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -940,14 +940,14 @@ static PyObject *gcaeget_flags(PyObject *me, void *hunoz)
 
 static PyGetSetDef gcaead_pygetset[] = {
 #define GETSETNAME(op, name) gcae##op##_##name
-  GET  (keysz,                 "AEC.keysz -> acceptable key sizes")
-  GET  (noncesz,               "AEC.noncesz -> acceptable nonce sizes")
-  GET  (tagsz,                 "AEC.tagsz -> acceptable tag sizes")
-  GET  (blksz,                 "AEC.blksz -> block size, or zero")
-  GET  (bufsz,                 "AEC.bufsz -> amount of data buffered internally")
-  GET  (ohd,                   "AEC.ohd -> maximum encryption overhead")
-  GET  (name,                  "AEC.name -> name of this kind of AEAD scheme")
-  GET  (flags,                 "AEC.flags -> mask of `AEADF_...' flags")
+  GET  (keysz,         "AEC.keysz -> acceptable key sizes")
+  GET  (noncesz,       "AEC.noncesz -> acceptable nonce sizes")
+  GET  (tagsz,         "AEC.tagsz -> acceptable tag sizes")
+  GET  (blksz,         "AEC.blksz -> block size, or zero")
+  GET  (bufsz,         "AEC.bufsz -> amount of data buffered internally")
+  GET  (ohd,           "AEC.ohd -> maximum encryption overhead")
+  GET  (name,          "AEC.name -> name of this kind of AEAD scheme")
+  GET  (flags,         "AEC.flags -> mask of `AEADF_...' flags")
 #undef GETSETNAME
   { 0 }
 };
@@ -1044,9 +1044,9 @@ end:
 
 static PyMethodDef gaeadkey_pymethods[] = {
 #define METHNAME(name) gaekmeth_##name
-  METH  (aad,                  "KEY.aad() -> AAD")
-  KWMETH(enc,                  "KEY.enc(NONCE, [hsz], [msz], [tsz]) -> ENC")
-  KWMETH(dec,                  "KEY.dec(NONCE, [hsz], [csz], [tsz]) -> DEC")
+  METH (aad,           "KEY.aad() -> AAD")
+  KWMETH(enc,          "KEY.enc(NONCE, [hsz], [msz], [tsz]) -> ENC")
+  KWMETH(dec,          "KEY.dec(NONCE, [hsz], [csz], [tsz]) -> DEC")
 #undef METHNAME
   { 0 }
 };
@@ -1102,8 +1102,8 @@ static PyObject *gaeaget_hlen(PyObject *me, void *hunoz)
 
 static PyGetSetDef gaeadaad_pygetset[] = {
 #define GETSETNAME(op, name) gaea##op##_##name
-  GET  (hsz,                   "AAD.hsz -> precommitted header length or `None'")
-  GET  (hlen,                  "AAD.hlen -> header length so far")
+  GET  (hsz,           "AAD.hsz -> precommitted header length or `None'")
+  GET  (hlen,          "AAD.hlen -> header length so far")
 #undef GETSETNAME
   { 0 }
 };
@@ -1183,15 +1183,15 @@ static PyObject *gaeameth_hashstrz(PyObject *me, PyObject *arg)
 
 static PyMethodDef gaeadaad_pymethods[] = {
 #define METHNAME(name) gaeameth_##name
-  METH  (copy,                 "AAD.copy() -> AAD'")
-  METH  (hash,                 "AAD.hash(H)")
+  METH (copy,          "AAD.copy() -> AAD'")
+  METH (hash,          "AAD.hash(H)")
 #define METHU_(n, W, w) METH(hashu##w, "AAD.hashu" #w "(WORD)")
   DOUINTCONV(METHU_)
 #undef METHU_
 #define METHBUF_(n, W, w) METH(hashbuf##w, "AAD.hashbuf" #w "(BYTES)")
   DOUINTCONV(METHBUF_)
 #undef METHBUF_
-  METH  (hashstrz,             "AAD.hashstrz(STRING)")
+  METH (hashstrz,      "AAD.hashstrz(STRING)")
 #undef METHNAME
   { 0 }
 };
@@ -1239,10 +1239,10 @@ static PyObject *gaeeget_mlen(PyObject *me, void *hunoz)
 
 static PyGetSetDef gaeadenc_pygetset[] = {
 #define GETSETNAME(op, name) gaee##op##_##name
-  GET  (hsz,                   "ENC.hsz -> precommitted header length or `None'")
-  GET  (msz,                   "ENC.msz -> precommitted message length or `None'")
-  GET  (tsz,                   "ENC.tsz -> precommitted tag length or `None'")
-  GET  (mlen,                  "ENC.mlen -> message length so far")
+  GET  (hsz,           "ENC.hsz -> precommitted header length or `None'")
+  GET  (msz,           "ENC.msz -> precommitted message length or `None'")
+  GET  (tsz,           "ENC.tsz -> precommitted tag length or `None'")
+  GET  (mlen,          "ENC.mlen -> message length so far")
 #undef GETSETNAME
   { 0 }
 };
@@ -1364,10 +1364,10 @@ end:
 
 static PyMethodDef gaeadenc_pymethods[] = {
 #define METHNAME(name) gaeemeth_##name
-  METH  (aad,                  "ENC.aad() -> AAD")
-  KWMETH(reinit,               "ENC.reinit(NONCE, [hsz], [msz], [tsz])")
-  METH  (encrypt,              "ENC.encrypt(MSG) -> CT")
-  KWMETH(done,                 "ENC.done([tsz], [aad]) -> CT, TAG")
+  METH (aad,           "ENC.aad() -> AAD")
+  KWMETH(reinit,       "ENC.reinit(NONCE, [hsz], [msz], [tsz])")
+  METH (encrypt,       "ENC.encrypt(MSG) -> CT")
+  KWMETH(done,         "ENC.done([tsz], [aad]) -> CT, TAG")
 #undef METHNAME
   { 0 }
 };
@@ -1414,10 +1414,10 @@ static PyObject *gaedget_clen(PyObject *me, void *hunoz)
 
 static PyGetSetDef gaeaddec_pygetset[] = {
 #define GETSETNAME(op, name) gaed##op##_##name
-  GET  (hsz,                   "DEC.hsz -> precommitted header length or `None'")
-  GET  (csz,                   "DEC.csz -> precommitted ciphertext length or `None'")
-  GET  (tsz,                   "DEC.tsz -> precommitted tag length or `None'")
-  GET  (clen,                  "DEC.clen -> ciphertext length so far")
+  GET  (hsz,           "DEC.hsz -> precommitted header length or `None'")
+  GET  (csz,          "DEC.csz -> precommitted ciphertext length or `None'")
+  GET  (tsz,           "DEC.tsz -> precommitted tag length or `None'")
+  GET  (clen,          "DEC.clen -> ciphertext length so far")
 #undef GETSETNAME
   { 0 }
 };
@@ -1527,10 +1527,10 @@ end:
 
 static PyMethodDef gaeaddec_pymethods[] = {
 #define METHNAME(name) gaedmeth_##name
-  METH  (aad,                  "DEC.aad() -> AAD")
-  KWMETH(reinit,               "DEC.reinit(NONCE, [hsz], [csz], [tsz])")
-  METH  (decrypt,              "DEC.decrypt(CT) -> MSG")
-  KWMETH(done,                 "DEC.done(TAG, [aad]) -> MSG | None")
+  METH (aad,           "DEC.aad() -> AAD")
+  KWMETH(reinit,       "DEC.reinit(NONCE, [hsz], [csz], [tsz])")
+  METH (decrypt,       "DEC.decrypt(CT) -> MSG")
+  KWMETH(done,         "DEC.done(TAG, [aad]) -> MSG | None")
 #undef METHNAME
   { 0 }
 };
@@ -1560,7 +1560,7 @@ static PyTypeObject gcaead_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Authenticated encryption (key) metaclass.",
+  "Authenticated encryption (key) metaclass.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -1608,7 +1608,7 @@ static PyTypeObject gaeadkey_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Authenticated encryption key.",
+  "Authenticated encryption key.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -1656,7 +1656,7 @@ static PyTypeObject gcaeadaad_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Authenticated encryption additional-data hash metaclass.",
+  "Authenticated encryption additional-data hash metaclass.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -1704,7 +1704,7 @@ static PyTypeObject gaeadaad_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Authenticated encryption AAD hash.",
+  "Authenticated encryption AAD hash.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -1752,7 +1752,7 @@ static PyTypeObject gcaeadenc_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Authenticated encryption operation metaclass.",
+  "Authenticated encryption operation metaclass.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -1800,7 +1800,7 @@ static PyTypeObject gaeadenc_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Authenticated encryption operation.",
+  "Authenticated encryption operation.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -1848,7 +1848,7 @@ static PyTypeObject gcaeaddec_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Authenticated decryption operation metaclass.",
+  "Authenticated decryption operation metaclass.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -1896,7 +1896,7 @@ static PyTypeObject gaeaddec_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Authenticated decryption operation.",
+  "Authenticated decryption operation.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -2050,25 +2050,25 @@ static PyObject *ghmeth_done(PyObject *me, PyObject *arg)
 
 static PyGetSetDef gchash_pygetset[] = {
 #define GETSETNAME(op, name) gch##op##_##name
-  GET  (bufsz,                 "CH.bufsz -> hash buffer size, or zero")
-  GET  (hashsz,                "CH.hashsz -> hash output size")
-  GET  (name,                  "CH.name -> name of this kind of hash")
+  GET  (bufsz,         "CH.bufsz -> hash buffer size, or zero")
+  GET  (hashsz,        "CH.hashsz -> hash output size")
+  GET  (name,          "CH.name -> name of this kind of hash")
 #undef GETSETNAME
   { 0 }
 };
 
 static PyMethodDef ghash_pymethods[] = {
 #define METHNAME(name) ghmeth_##name
-  METH (copy,                  "H.copy() -> HH")
-  METH (hash,                  "H.hash(M)")
+  METH (copy,          "H.copy() -> HH")
+  METH (hash,          "H.hash(M)")
 #define METHU_(n, W, w) METH(hashu##w, "H.hashu" #w "(WORD)")
   DOUINTCONV(METHU_)
 #undef METHU_
 #define METHBUF_(n, W, w) METH(hashbuf##w, "H.hashbuf" #w "(BYTES)")
   DOUINTCONV(METHBUF_)
 #undef METHBUF_
-  METH (hashstrz,              "H.hashstrz(STRING)")
-  METH (done,                  "H.done() -> HASH")
+  METH (hashstrz,      "H.hashstrz(STRING)")
+  METH (done,          "H.done() -> HASH")
 #undef METHNAME
   { 0 }
 };
@@ -2098,7 +2098,7 @@ static PyTypeObject gchash_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Hash function metaclass.",
+  "Hash function metaclass.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -2146,7 +2146,7 @@ static PyTypeObject ghash_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Hash function, abstract base class.",
+  "Hash function, abstract base class.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -2280,9 +2280,9 @@ static PyObject *gcmget_tagsz(PyObject *me, void *hunoz)
 
 static PyGetSetDef gcmac_pygetset[] = {
 #define GETSETNAME(op, name) gcm##op##_##name
-  GET  (keysz,                 "CM.keysz -> acceptable key sizes")
-  GET  (tagsz,                 "CM.tagsz -> MAC output size")
-  GET  (name,                  "CM.name -> name of this kind of MAC")
+  GET  (keysz,         "CM.keysz -> acceptable key sizes")
+  GET  (tagsz,         "CM.tagsz -> MAC output size")
+  GET  (name,          "CM.name -> name of this kind of MAC")
 #undef GETSETNAME
   { 0 }
 };
@@ -2312,7 +2312,7 @@ static PyTypeObject gcmac_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Message authentication code metametaclass.",
+  "Message authentication code metametaclass.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -2360,7 +2360,7 @@ static PyTypeObject gmac_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Message authentication code metaclass, abstract base class.",
+  "Message authentication code metaclass, abstract base class.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -2408,7 +2408,7 @@ static PyTypeObject gmhash_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Message authentication code, abstract base class.",
+  "Message authentication code, abstract base class.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -2616,29 +2616,29 @@ end:
 
 static PyGetSetDef poly1305cls_pygetset[] = {
 #define GETSETNAME(op, name) poly1305cls##op##_##name
-  GET  (keysz,                 "PC.keysz -> acceptable key sizes")
-  GET  (masksz,                "PC.masksz -> mask size")
-  GET  (tagsz,                 "PC.tagsz -> MAC output size")
-  GET  (name,                  "PC.name -> name of this kind of MAC")
+  GET  (keysz,         "PC.keysz -> acceptable key sizes")
+  GET  (masksz,        "PC.masksz -> mask size")
+  GET  (tagsz,         "PC.tagsz -> MAC output size")
+  GET  (name,          "PC.name -> name of this kind of MAC")
 #undef GETSETNAME
   { 0 }
 };
 
 static PyMethodDef poly1305hash_pymethods[] = {
 #define METHNAME(name) polymeth_##name
-  METH  (copy,                 "P.copy() -> PP")
-  METH (hash,                  "P.hash(M)")
+  METH (copy,          "P.copy() -> PP")
+  METH (hash,          "P.hash(M)")
 #define METHU_(n, W, w) METH(hashu##w, "P.hashu" #w "(WORD)")
   DOUINTCONV(METHU_)
 #undef METHU_
 #define METHBUF_(n, W, w) METH(hashbuf##w, "P.hashbuf" #w "(BYTES)")
   DOUINTCONV(METHBUF_)
 #undef METHBUF_
-  METH (hashstrz,              "P.hashstrz(STRING)")
-  METH  (flush,                        "P.flush()")
-  METH  (flushzero,            "P.flushzero()")
-  METH  (concat,               "P.concat(PREFIX, SUFFIX)")
-  METH (done,                  "P.done() -> TAG")
+  METH (hashstrz,      "P.hashstrz(STRING)")
+  METH (flush,         "P.flush()")
+  METH (flushzero,     "P.flushzero()")
+  METH (concat,        "P.concat(PREFIX, SUFFIX)")
+  METH (done,          "P.done() -> TAG")
 #undef METHNAME
   { 0 }
 };
@@ -2668,7 +2668,7 @@ static PyTypeObject poly1305cls_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Poly1305 metametaclass.  Best not to ask.",
+  "Poly1305 metametaclass.  Best not to ask.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -2716,7 +2716,7 @@ static PyTypeObject poly1305key_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"poly1305(K): Poly1305 key.",
+  "poly1305(K): Poly1305 key.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -2764,7 +2764,7 @@ static PyTypeObject poly1305hash_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Poly1305 MAC context base class.",
+  "Poly1305 MAC context base class.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -2927,17 +2927,17 @@ end:
 
 static PyGetSetDef kxvik_pygetset[] = {
 #define GETSETNAME(op, name) kxvik##op##_##name
-  GETSET(nround,               "KECCAK.nround -> number of rounds")
+  GETSET(nround,       "KECCAK.nround -> number of rounds")
 #undef GETSETNAME
   { 0 }
 };
 
 static PyMethodDef kxvik_pymethods[] = {
 #define METHNAME(func) kxvikmeth_##func
-  METH (copy,                  "KECCAK.copy() -> KECCAK'")
-  METH (mix,                   "KECCAK.mix(DATA)")
-  METH (extract,               "KECCAK.extract(NOCTETS)")
-  METH (step,                  "KECCAK.step()")
+  METH (copy,          "KECCAK.copy() -> KECCAK'")
+  METH (mix,           "KECCAK.mix(DATA)")
+  METH (extract,       "KECCAK.extract(NOCTETS)")
+  METH (step,          "KECCAK.step()")
 #undef METHNAME
   { 0 }
 };
@@ -2967,7 +2967,7 @@ static PyTypeObject kxvik_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Keccak1600([nround = 24]): Keccak-p[1600, n] state.",
+  "Keccak1600([nround = 24]): Keccak-p[1600, n] state.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -3163,28 +3163,28 @@ static PyObject *shakeget_state(PyObject *me, void *hunoz)
 
 static PyGetSetDef shake_pygetset[] = {
 #define GETSETNAME(op, name) shake##op##_##name
-  GET  (rate,                  "S.rate -> rate, in bytes")
-  GET  (buffered,              "S.buffered -> amount currently buffered")
-  GET  (state,                 "S.state -> `absorb', `squeeze', `dead'")
+  GET  (rate,          "S.rate -> rate, in bytes")
+  GET  (buffered,      "S.buffered -> amount currently buffered")
+  GET  (state,         "S.state -> `absorb', `squeeze', `dead'")
 #undef GETSETNAME
   { 0 }
 };
 
 static PyMethodDef shake_pymethods[] = {
 #define METHNAME(func) shakemeth_##func
-  METH  (copy,                 "S.copy() -> SS")
-  METH (hash,                  "S.hash(M)")
+  METH (copy,          "S.copy() -> SS")
+  METH (hash,          "S.hash(M)")
 #define METHU_(n, W, w) METH(hashu##w, "S.hashu" #w "(WORD)")
   DOUINTCONV(METHU_)
 #undef METHU_
 #define METHBUF_(n, W, w) METH(hashbuf##w, "S.hashbuf" #w "(BYTES)")
   DOUINTCONV(METHBUF_)
 #undef METHBUF_
-  METH (hashstrz,              "S.hashstrz(STRING)")
-  METH (xof,                   "S.xof()")
-  METH (done,                  "S.done(LEN) ->H")
-  METH (get,                   "S.get(LEN) -> H")
-  METH (mask,                  "S.mask(M) -> C")
+  METH (hashstrz,      "S.hashstrz(STRING)")
+  METH (xof,           "S.xof()")
+  METH (done,          "S.done(LEN) -> H")
+  METH (get,           "S.get(LEN) -> H")
+  METH (mask,          "S.mask(M) -> C")
 #undef METHNAME
   { 0 }
 };
@@ -3214,7 +3214,7 @@ static PyTypeObject shake_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"SHAKE/cSHAKE base class.",
+  "SHAKE/cSHAKE/KMAC base class.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -3262,7 +3262,7 @@ static PyTypeObject shake128_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Shake128([perso = STR], [func = STR]): SHAKE128/cSHAKE128 XOF.",
+  "Shake128([perso = STR], [func = STR]): SHAKE128/cSHAKE128 XOF.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -3310,7 +3310,7 @@ static PyTypeObject shake256_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Shake256([perso = STR], [func = STR]): SHAKE256/cSHAKE256 XOF.",
+  "Shake256([perso = STR], [func = STR]): SHAKE256/cSHAKE256 XOF.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -3467,17 +3467,17 @@ end:
 
 static PyGetSetDef gcprp_pygetset[] = {
 #define GETSETNAME(op, name) gcp##op##_##name
-  GET  (keysz,                 "CP.keysz -> acceptable key sizes")
-  GET  (blksz,                 "CP.blksz -> block size")
-  GET  (name,                  "CP.name -> name of this kind of PRP")
+  GET  (keysz,         "CP.keysz -> acceptable key sizes")
+  GET  (blksz,         "CP.blksz -> block size")
+  GET  (name,          "CP.name -> name of this kind of PRP")
 #undef GETSETNAME
   { 0 }
 };
 
 static PyMethodDef gprp_pymethods[] = {
 #define METHNAME(name) gpmeth_##name
-  METH (encrypt,               "P.encrypt(PT) -> CT")
-  METH (decrypt,               "P.decrypt(CT) -> PT")
+  METH (encrypt,       "P.encrypt(PT) -> CT")
+  METH (decrypt,       "P.decrypt(CT) -> PT")
 #undef METHNAME
   { 0 }
 };
@@ -3507,7 +3507,7 @@ static PyTypeObject gcprp_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Pseudorandom permutation metaclass.",
+  "Pseudorandom permutation metaclass.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -3555,7 +3555,7 @@ static PyTypeObject gprp_pytype_skel = {
     Py_TPFLAGS_BASETYPE,
 
   /* @tp_doc@ */
-"Pseudorandom permutation, abstract base class.",
+  "Pseudorandom permutation, abstract base class.",
 
   0,                                   /* @tp_traverse@ */
   0,                                   /* @tp_clear@ */
@@ -3582,26 +3582,26 @@ static PyTypeObject gprp_pytype_skel = {
 
 static PyMethodDef methods[] = {
 #define METHNAME(func) meth_##func
-  METH (_KeySZ_fromdl,         "\
-fromdl(N) -> M: convert integer discrete log field size to work factor")
-  METH (_KeySZ_fromschnorr,    "\
-fromschnorr(N) -> M: convert Schnorr group order to work factor")
-  METH (_KeySZ_fromif,         "\
-fromif(N) -> M: convert integer factorization problem size to work factor")
-  METH (_KeySZ_fromec,         "\
-fromec(N) -> M: convert elliptic curve group order to work factor")
-  METH (_KeySZ_todl,           "\
-todl(N) -> M: convert work factor to integer discrete log field size")
-  METH (_KeySZ_toschnorr,      "\
-toschnorr(N) -> M: convert work factor to Schnorr group order")
-  METH (_KeySZ_toif,           "\
-toif(N) -> M: convert work factor to integer factorization problem size")
-  METH (_KeySZ_toec,           "\
-toec(N) -> M: convert work factor to elliptic curve group order")
-  METH (_KeySZ_toec,           "\
-toec(N) -> M: convert work factor to elliptic curve group order")
-#define METH_HDANCE(hdance, HDance) METH(hdance##_prf, "\
-" #hdance "_prf(K, N) -> H: calculate " HDance " hash of N with K")
+  METH (_KeySZ_fromdl, "fromdl(N) -> M: "
+                   "convert integer discrete log field size to work factor")
+  METH (_KeySZ_fromschnorr, "fromschnorr(N) -> M: "
+                               "convert Schnorr group order to work factor")
+  METH (_KeySZ_fromif, "fromif(N) -> M: "
+                "convert integer factorization problem size to work factor")
+  METH (_KeySZ_fromec, "fromec(N) -> M: "
+                        "convert elliptic curve group order to work factor")
+  METH (_KeySZ_todl,   "todl(N) -> M: "
+                   "convert work factor to integer discrete log field size")
+  METH (_KeySZ_toschnorr, "toschnorr(N) -> M: "
+                               "convert work factor to Schnorr group order")
+  METH (_KeySZ_toif,   "toif(N) -> M: "
+                "convert work factor to integer factorization problem size")
+  METH (_KeySZ_toec,   "toec(N) -> M: "
+                        "convert work factor to elliptic curve group order")
+  METH (_KeySZ_toec,   "toec(N) -> M: "
+                        "convert work factor to elliptic curve group order")
+#define METH_HDANCE(hdance, HDance) METH(hdance##_prf,                 \
+        "" #hdance "_prf(K, N) -> H: calculate " HDance " hash of N with K")
   METH_HDANCE(hsalsa20, "HSalsa20")
   METH_HDANCE(hsalsa2012, "HSalsa20/12")
   METH_HDANCE(hsalsa208, "HSalsa20/8")