Commit 1bdc3fd2 authored by Brian Wellington's avatar Brian Wellington
Browse files

dst_random -> dst_random_get

parent b7828bc2
......@@ -102,7 +102,7 @@ get_random() {
unsigned int i;
isc_buffer_init(&databuf, data, sizeof data, ISC_BUFFERTYPE_BINARY);
ret = dst_random(sizeof(data), &databuf);
ret = dst_random_get(sizeof(data), &databuf);
printf("random() returned: %s\n", dst_result_totext(ret));
for (i = 0; i < sizeof data; i++)
printf("%02x ", data[i]);
......
......@@ -209,7 +209,7 @@ get_random(int *nfails) {
unsigned int i;
isc_buffer_init(&databuf1, data1, sizeof(data1), ISC_BUFFERTYPE_BINARY);
ret = dst_random(sizeof(data1), &databuf1);
ret = dst_random_get(sizeof(data1), &databuf1);
if (ret != DST_R_SUCCESS) {
t_info("random() returned: %s\n", dst_result_totext(ret));
++*nfails;
......@@ -217,7 +217,7 @@ get_random(int *nfails) {
}
isc_buffer_init(&databuf2, data2, sizeof(data2), ISC_BUFFERTYPE_BINARY);
ret = dst_random(sizeof(data2), &databuf2);
ret = dst_random_get(sizeof(data2), &databuf2);
if (ret != DST_R_SUCCESS) {
t_info("random() returned: %s\n", dst_result_totext(ret));
++*nfails;
......
......@@ -19,7 +19,7 @@
/*
* Principal Author: Brian Wellington
* $Id: bsafe_link.c,v 1.8 1999/10/08 22:14:24 tale Exp $
* $Id: bsafe_link.c,v 1.9 1999/10/20 19:08:56 bwelling Exp $
*/
#include <config.h>
......@@ -864,7 +864,7 @@ dst_bsafe_generate(dst_key_t *key, int exp, isc_mem_t *mctx) {
isc_buffer_init(&rand, randomSeed, sizeof(randomSeed),
ISC_BUFFERTYPE_BINARY);
ret = dst_random(sizeof(randomSeed), &rand);
ret = dst_random_get(sizeof(randomSeed), &rand);
if (ret != DST_R_SUCCESS)
goto fail;
......
......@@ -17,7 +17,7 @@
/*
* Principal Author: Brian Wellington
* $Id: dst_api.c,v 1.15 1999/10/18 21:35:46 bwelling Exp $
* $Id: dst_api.c,v 1.16 1999/10/20 19:08:57 bwelling Exp $
*/
#include <config.h>
......@@ -773,7 +773,7 @@ dst_secret_size(const dst_key_t *key) {
}
/*
* dst_random
* dst_random_get
* a random number generator that can generate different levels of
* randomness
* Parameters
......@@ -785,7 +785,7 @@ dst_secret_size(const dst_key_t *key) {
* !ISC_R_SUCCESS Failure
*/
dst_result_t
dst_random(const unsigned int wanted, isc_buffer_t *target) {
dst_random_get(const unsigned int wanted, isc_buffer_t *target) {
isc_region_t r;
RUNTIME_CHECK(isc_once_do(&once, initialize) == ISC_R_SUCCESS);
......
......@@ -17,7 +17,7 @@
/*
* Principal Author: Brian Wellington
* $Id: hmac_link.c,v 1.10 1999/10/18 21:35:46 bwelling Exp $
* $Id: hmac_link.c,v 1.11 1999/10/20 19:08:57 bwelling Exp $
*/
#include <config.h>
......@@ -455,7 +455,7 @@ dst_hmacmd5_generate(dst_key_t *key, int unused, isc_mem_t *mctx) {
memset(data, 0, HMAC_LEN);
isc_buffer_init(&b, data, sizeof(data), ISC_BUFFERTYPE_BINARY);
ret = dst_random(bytes, &b);
ret = dst_random_get(bytes, &b);
if (ret != DST_R_SUCCESS)
return (ret);
......
......@@ -323,7 +323,7 @@ dst_secret_size(const dst_key_t *key);
* be advanced.
*/
dst_result_t
dst_random(const unsigned int wanted, isc_buffer_t *data);
dst_random_get(const unsigned int wanted, isc_buffer_t *data);
ISC_LANG_ENDDECLS
......
......@@ -19,7 +19,7 @@
/*
* Principal Author: Brian Wellington
* $Id: openssl_link.c,v 1.9 1999/10/08 13:08:56 bwelling Exp $
* $Id: openssl_link.c,v 1.10 1999/10/20 19:08:57 bwelling Exp $
*/
#include <config.h>
......@@ -553,7 +553,7 @@ dst_openssl_generate(dst_key_t *key, int unused, isc_mem_t *mctx) {
isc_buffer_init(&rand, rand_array, sizeof(rand_array),
ISC_BUFFERTYPE_BINARY);
ret = dst_random(SHA_DIGEST_LENGTH, &rand);
ret = dst_random_get(SHA_DIGEST_LENGTH, &rand);
if (ret != DST_R_SUCCESS)
return (ret);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment