/* noekeon_prng.c */
/*
* This file is part of the AVR-Crypto-Lib.
- * Copyright (C) 2006, 2007, 2008 Daniel Otte (daniel.otte@rub.de)
+ * Copyright (C) 2006-2015 Daniel Otte (bg@nerilex.org)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
*/
-#include "noekeon/noekeon.h"
-#include "memxor/memxor.h"
+#include "noekeon.h"
+#include "memxor.h"
#include <stdint.h>
#include <string.h>
return sr[i];
}
-void random_block(void* dest){
+void random_block(void *dest){
i=0;
noekeon_enc(random_state, random_key);
memcpy(dest, random_state, 16);
memcpy(random_key, &seed, 4);
}
-void random_seed(const void* buffer){
+void random_seed(const void *buffer){
memcpy(random_key, buffer, 16);
}
-void random_add(const void* buffer){
+void random_add(const void *buffer){
memxor(random_key, buffer, 16);
}