|
@ -1,4 +1,4 @@ |
|
|
/* $OpenBSD: getentropy_aix.c,v 1.2 2015/04/27 03:34:43 bcook Exp $ */ |
|
|
|
|
|
|
|
|
/* $OpenBSD: getentropy_aix.c,v 1.3 2015/08/25 17:26:43 deraadt Exp $ */ |
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|
* Copyright (c) 2015 Michael Felt <aixtools@gmail.com> |
|
|
* Copyright (c) 2015 Michael Felt <aixtools@gmail.com> |
|
@ -17,7 +17,7 @@ |
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
|
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
|
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
|
|
* |
|
|
* |
|
|
* Intended to Emulate getentropy(2) as documented at: |
|
|
|
|
|
|
|
|
* Emulation of getentropy(2) as documented at: |
|
|
* http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/getentropy.2 |
|
|
* http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/getentropy.2 |
|
|
*/ |
|
|
*/ |
|
|
/* |
|
|
/* |
|
@ -56,7 +56,7 @@ |
|
|
|
|
|
|
|
|
#define HR(x, l) (SHA512_Update(&ctx, (char *)(x), (l))) |
|
|
#define HR(x, l) (SHA512_Update(&ctx, (char *)(x), (l))) |
|
|
#define HD(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (x))) |
|
|
#define HD(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (x))) |
|
|
#define HF(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (void*))) |
|
|
|
|
|
|
|
|
#define HF(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (void*))) |
|
|
|
|
|
|
|
|
int getentropy(void *buf, size_t len); |
|
|
int getentropy(void *buf, size_t len); |
|
|
|
|
|
|
|
|