{
PyObject *set = ((keyszset_pyobj *)me)->set;
int i, n, y, x = -1;
- n = PyTuple_Size(set);
+ n = PyTuple_GET_SIZE(set);
for (i = 0; i < n; i++) {
- y = PyInt_AsLong(PyTuple_GetItem(set, i));
+ y = PyInt_AS_LONG(PyTuple_GET_ITEM(set, i));
if (x == -1 || y < x) x = y;
}
return (PyInt_FromLong(x));
{
PyObject *set = ((keyszset_pyobj *)me)->set;
int i, n, y, x = -1;
- n = PyTuple_Size(set);
+ n = PyTuple_GET_SIZE(set);
for (i = 0; i < n; i++) {
- y = PyInt_AsLong(PyTuple_GetItem(set, i));
+ y = PyInt_AS_LONG(PyTuple_GET_ITEM(set, i));
if (y > x) x = y;
}
return (PyInt_FromLong(x));
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 }
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 }
};
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Key size constraints. Abstract.",
+ "Key size constraints. Abstract.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
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@ */
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@ */
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@ */
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 }
};
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Symmetric cipher metaclass.",
+ "Symmetric cipher metaclass.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Symmetric cipher, abstract base class.",
+ "Symmetric cipher, abstract base class.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
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 }
};
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 }
};
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 }
};
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 }
};
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 }
};
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 }
};
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 }
};
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 }
};
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Authenticated encryption (key) metaclass.",
+ "Authenticated encryption (key) metaclass.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Authenticated encryption key.",
+ "Authenticated encryption key.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Authenticated encryption additional-data hash metaclass.",
+ "Authenticated encryption additional-data hash metaclass.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Authenticated encryption AAD hash.",
+ "Authenticated encryption AAD hash.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Authenticated encryption operation metaclass.",
+ "Authenticated encryption operation metaclass.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Authenticated encryption operation.",
+ "Authenticated encryption operation.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Authenticated decryption operation metaclass.",
+ "Authenticated decryption operation metaclass.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Authenticated decryption operation.",
+ "Authenticated decryption operation.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
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 }
};
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Hash function metaclass.",
+ "Hash function metaclass.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Hash function, abstract base class.",
+ "Hash function, abstract base class.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
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 }
};
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Message authentication code metametaclass.",
+ "Message authentication code metametaclass.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
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@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Message authentication code, abstract base class.",
+ "Message authentication code, abstract base class.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
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 }
};
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Poly1305 metametaclass. Best not to ask.",
+ "Poly1305 metametaclass. Best not to ask.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"poly1305(K): Poly1305 key.",
+ "poly1305(K): Poly1305 key.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Poly1305 MAC context base class.",
+ "Poly1305 MAC context base class.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
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 }
};
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@ */
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 }
};
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"SHAKE/cSHAKE base class.",
+ "SHAKE/cSHAKE/KMAC base class.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
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@ */
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@ */
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 }
};
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Pseudorandom permutation metaclass.",
+ "Pseudorandom permutation metaclass.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
Py_TPFLAGS_BASETYPE,
/* @tp_doc@ */
-"Pseudorandom permutation, abstract base class.",
+ "Pseudorandom permutation, abstract base class.",
0, /* @tp_traverse@ */
0, /* @tp_clear@ */
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")