diff options
author | Ben Pfaff <blp@nicira.com> | 2010-08-12 15:47:25 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-08-12 15:47:25 -0700 |
commit | e251c8d0050acf8d3f35c91b6d2708fab5314ce7 (patch) | |
tree | 861fbfb218bc5bc94d4cc853c705af55f33a9ac7 /lib/entropy.h | |
parent | e2c1a82010cc4f35cb576d41c3c2020010503784 (diff) |
uuid: Break code to read /dev/urandom into a new module.
This code is useful for seeding other random number generators, so we might
as well make it a separate source file.
Diffstat (limited to 'lib/entropy.h')
-rw-r--r-- | lib/entropy.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/entropy.h b/lib/entropy.h new file mode 100644 index 00000000..6d256e0b --- /dev/null +++ b/lib/entropy.h @@ -0,0 +1,24 @@ +/* Copyright (c) 2010 Nicira Networks + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ENTROPY_H +#define ENTROPY_H 1 + +#include <stddef.h> + +int get_entropy(void *, size_t); +void get_entropy_or_die(void *, size_t); + +#endif /* entropy.h */ |