chiark / gitweb /
catacomb/pwsafe.py: Factor database handling out into a StorageBackend.
[catacomb-python] / rand.c
diff --git a/rand.c b/rand.c
index 7a3ad532d85af309f284205505f5334cb2685b41..3bcd0a9166840eb7a9d4d6dc51f2d5674e708d49 100644 (file)
--- a/rand.c
+++ b/rand.c
@@ -1,13 +1,11 @@
 /* -*-c-*-
- *
- * $Id$
  *
  * Random-number generators
  *
  * (c) 2004 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of the Python interface to Catacomb.
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * Catacomb/Python is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with Catacomb/Python; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -524,7 +522,7 @@ static PyObject *trget_goodbits(PyObject *me, void *hunoz)
 
 static PyGetSetDef truerand_pygetset[] = {
 #define GETSETNAME(op, name) tr##op##_##name
-  GET  (goodbits,      "R.goodbits -> good bits of entropy remaining")
+  GET  (goodbits,      "R.goodbits -> good bits of entropy remaining")
 #undef GETSETNAME
   { 0 }
 };
@@ -619,7 +617,7 @@ static PyObject *gcrand_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
   if (keysz(n, info->keysz) != n) VALERR("bad key length");
   return (grand_dopywrap(ty, info->func(k, n), f_freeme));
 end:
-  return (0);  
+  return (0);
 }
 
 static PyObject *gcirand_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
@@ -638,7 +636,7 @@ static PyObject *gcirand_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
                         ((gcirand_func *)info->func)(k, n, i),
                         f_freeme));
 end:
-  return (0);  
+  return (0);
 }
 
 static PyObject *gccrand_pywrap(const gccrand_info *info)
@@ -980,7 +978,7 @@ static PyObject *dsarand_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw)
     goto end;
   rc = grand_dopywrap(ty, dsarand_create(p, sz), f_freeme);
 end:
-  return (0);
+  return (rc);
 }
 
 static PyObject *drget_seed(PyObject *me, void *hunoz)
@@ -1236,7 +1234,7 @@ static PyObject *meth__BBSPriv_generate(PyObject *me,
   rc->bp.n = MP_COPY(bp.n);
 end:
   mp_drop(bp.p); mp_drop(bp.q); mp_drop(bp.n); mp_drop(x);
-  return ((PyObject *)rc); 
+  return ((PyObject *)rc);
 }
 
 static void bbspriv_pydealloc(PyObject *me)
@@ -1281,9 +1279,9 @@ static PyMethodDef bbspriv_pymethods[] = {
 
 static PyGetSetDef bbspriv_pygetset[] = {
 #define GETSETNAME(op, name) bp##op##_##name
-  GET  (n,             "R.n -> Blum modulus")
-  GET  (p,             "R.p -> one of the factors of the modulus")
-  GET  (q,             "R.q -> one of the factors of the modulus")
+  GET  (n,             "R.n -> Blum modulus")
+  GET  (p,             "R.p -> one of the factors of the modulus")
+  GET  (q,             "R.q -> one of the factors of the modulus")
 #undef GETSETNAME
   { 0 }
 };