Merge pull request #96 from leetronics/master
merge with leetronics/infnoise
This commit is contained in:
@@ -30,7 +30,7 @@ if [ ! -e build/usr/sbin/infnoise ] ; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
fakeroot dpkg -b build/ infnoise_${VERSION}_${ARCH}.deb
|
||||
fakeroot dpkg-deb -Zxz -b build/ infnoise_${VERSION}_${ARCH}.deb
|
||||
|
||||
### build infnoise-tools ###
|
||||
rm -rf build
|
||||
@@ -54,7 +54,7 @@ cp ../build-scripts/control.debian.tools build/DEBIAN/control
|
||||
echo "Version: $VERSION" >> build/DEBIAN/control
|
||||
echo "Architecture: $ARCH" >> build/DEBIAN/control
|
||||
|
||||
fakeroot dpkg -b build/ infnoise-tools_${VERSION}_${ARCH}.deb
|
||||
fakeroot dpkg-deb -Zxz -b build/ infnoise-tools_${VERSION}_${ARCH}.deb
|
||||
|
||||
rm -rf build
|
||||
cd ..
|
||||
@@ -75,6 +75,6 @@ cp build-scripts/control.debian.lib build/DEBIAN/control
|
||||
echo "Version: $VERSION" >> build/DEBIAN/control
|
||||
echo "Architecture: $ARCH" >> build/DEBIAN/control
|
||||
|
||||
fakeroot dpkg -b build/ libinfnoise_${VERSION}_${ARCH}.deb
|
||||
fakeroot dpkg-deb -Zxz -b build/ libinfnoise_${VERSION}_${ARCH}.deb
|
||||
|
||||
rm -rf build
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
// We also write this in one go to the Keccak sponge, which is at most 1600 bits
|
||||
#define BUFLEN 512u
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32)
|
||||
struct infnoise_context {
|
||||
struct ftdi_context ftdic;
|
||||
@@ -86,4 +90,8 @@ void deinitInfnoise(struct infnoise_context *context);
|
||||
*/
|
||||
uint32_t readData(struct infnoise_context *context, uint8_t *result, bool raw, uint32_t outputMultiplier);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
libinfnoise {
|
||||
global: listUSBDevices; initInfnoise; readRawData; readData; # explicitly list symbols to be exported
|
||||
global: listUSBDevices; initInfnoise; deinitInfnoise; readRawData; readData; # explicitly list symbols to be exported
|
||||
local: *; # hide everything else
|
||||
};
|
||||
|
||||
|
||||
2
software/tools/findlongest.c
Normal file → Executable file
2
software/tools/findlongest.c
Normal file → Executable file
@@ -98,7 +98,7 @@ int main(int argc, char **argv) {
|
||||
} else {
|
||||
data = readDataFromFile(argv[1], &dataLen);
|
||||
}
|
||||
uint8_t *stringsSeen = calloc((uint64_t)1 << (MAX_STRING_SIZE-3u), sizeof(uint8_t));
|
||||
uint8_t *stringsSeen = calloc((uint64_t)1 << (MAX_STRING_SIZE-4u), sizeof(uint8_t));
|
||||
uint32_t len;
|
||||
for(len = 4u; len <= MAX_STRING_SIZE; len++) {
|
||||
if(!hasSubstringOfLength(len, data, dataLen, stringsSeen)) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/poll.h>
|
||||
#include <poll.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <fcntl.h>
|
||||
#include <linux/random.h>
|
||||
@@ -25,7 +25,7 @@ static uint32_t readNumberFromFile(char *fileName) {
|
||||
exit(1);
|
||||
}
|
||||
uint32_t value = 0u;
|
||||
char c;
|
||||
int32_t c;
|
||||
while( (c = getc(file)) != EOF
|
||||
&& '0' <= c && c <= '9' ) {
|
||||
value *= 10;
|
||||
|
||||
Reference in New Issue
Block a user