2015-08-11 11:23:30 +01:00
|
|
|
/*
|
|
|
|
prg.h version 20150811
|
|
|
|
Andreas Hülsing
|
|
|
|
Public domain.
|
|
|
|
*/
|
|
|
|
|
2015-08-11 11:08:27 +01:00
|
|
|
#ifndef PRG_H
|
|
|
|
#define PRG_H
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Generates rlen output bytes using key_len-byte key and places them in r.
|
|
|
|
*
|
|
|
|
*/
|
2015-08-12 14:30:01 +01:00
|
|
|
void prg(unsigned char *r, unsigned long long rlen, const unsigned char *key, unsigned int key_len);
|
2015-08-11 11:08:27 +01:00
|
|
|
|
|
|
|
/**
|
2015-10-28 14:49:46 +00:00
|
|
|
* Generates n output bytes using n-byte key and hash address addr and places them in r.
|
2015-08-11 11:08:27 +01:00
|
|
|
*
|
|
|
|
*/
|
2015-10-28 14:49:46 +00:00
|
|
|
void prg_with_counter(unsigned char *r, const unsigned char *key, unsigned int n, const unsigned char addr[16]);
|
2015-08-11 11:08:27 +01:00
|
|
|
#endif
|