~ubuntu-branches/ubuntu/lucid/openssl/lucid-proposed

« back to all changes in this revision

Viewing changes to crypto/bn/bn_rand.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-06-13 18:15:46 UTC
  • mto: (11.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090613181546-vbfntai3b009dl1u
Tags: upstream-0.9.8k
ImportĀ upstreamĀ versionĀ 0.9.8k

Show diffs side-by-side

added added

removed removed

Lines of Context:
227
227
 
228
228
 
229
229
/* random number r:  0 <= r < range */
230
 
static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range)
 
230
static int bn_rand_range(int pseudo, BIGNUM *r, const BIGNUM *range)
231
231
        {
232
232
        int (*bn_rand)(BIGNUM *, int, int, int) = pseudo ? BN_pseudo_rand : BN_rand;
233
233
        int n;
294
294
        }
295
295
 
296
296
 
297
 
int     BN_rand_range(BIGNUM *r, BIGNUM *range)
 
297
int     BN_rand_range(BIGNUM *r, const BIGNUM *range)
298
298
        {
299
299
        return bn_rand_range(0, r, range);
300
300
        }
301
301
 
302
 
int     BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range)
 
302
int     BN_pseudo_rand_range(BIGNUM *r, const BIGNUM *range)
303
303
        {
304
304
        return bn_rand_range(1, r, range);
305
305
        }