Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/random.h
/*- | /*- | ||||
* Copyright (c) 2000-2015 Mark R. V. Murray | * Copyright (c) 2000-2015, 2017 Mark R. V. Murray | ||||
* All rights reserved. | * All rights reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
* modification, are permitted provided that the following conditions | * modification, are permitted provided that the following conditions | ||||
* are met: | * are met: | ||||
* 1. Redistributions of source code must retain the above copyright | * 1. Redistributions of source code must retain the above copyright | ||||
* notice, this list of conditions and the following disclaimer | * notice, this list of conditions and the following disclaimer | ||||
* in this position and unchanged. | * in this position and unchanged. | ||||
▲ Show 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | enum random_entropy_source { | ||||
RANDOM_PURE_NEHEMIAH, | RANDOM_PURE_NEHEMIAH, | ||||
RANDOM_PURE_RNDTEST, | RANDOM_PURE_RNDTEST, | ||||
RANDOM_PURE_VIRTIO, | RANDOM_PURE_VIRTIO, | ||||
RANDOM_PURE_BROADCOM, | RANDOM_PURE_BROADCOM, | ||||
ENTROPYSOURCE | ENTROPYSOURCE | ||||
}; | }; | ||||
#define RANDOM_HARVEST_EVERYTHING_MASK ((1 << (RANDOM_ENVIRONMENTAL_END + 1)) - 1) | #define RANDOM_HARVEST_EVERYTHING_MASK ((1 << (RANDOM_ENVIRONMENTAL_END + 1)) - 1) | ||||
#define RANDOM_LEGACY_BOOT_ENTROPY_MODULE "/boot/entropy" | |||||
#define RANDOM_CACHED_BOOT_ENTROPY_MODULE "boot_entropy_cache" | |||||
#define RANDOM_CACHED_SKIP_START 256 | |||||
#if defined(DEV_RANDOM) | #if defined(DEV_RANDOM) | ||||
void random_harvest_queue(const void *, u_int, u_int, enum random_entropy_source); | void random_harvest_queue(const void *, u_int, u_int, enum random_entropy_source); | ||||
void random_harvest_fast(const void *, u_int, u_int, enum random_entropy_source); | void random_harvest_fast(const void *, u_int, u_int, enum random_entropy_source); | ||||
void random_harvest_direct(const void *, u_int, u_int, enum random_entropy_source); | void random_harvest_direct(const void *, u_int, u_int, enum random_entropy_source); | ||||
#else | #else | ||||
#define random_harvest_queue(a, b, c, d) do {} while (0) | #define random_harvest_queue(a, b, c, d) do {} while (0) | ||||
#define random_harvest_fast(a, b, c, d) do {} while (0) | #define random_harvest_fast(a, b, c, d) do {} while (0) | ||||
Show All 12 Lines |