KeyGeneration and IV algorithm
Spaniakos - Keygeneration and IV algorythm for Arduino and Raspberry Pi
KEYGEN.h
1 /*
2  Copyright (C) 2014 G. Spanos <spaniakos@gmail.com
3 
4  This program is free software; you can redistribute it and/or
5  modify it under the terms of the GNU General Public License
6  version 2 as published by the Free Software Foundation.
7  */
8 
15 #ifndef __KEYGEN_H__
16 #define __KEYGEN_H__
17 
18 #include "KEYGEN_config.h"
19 
20 class KEYGEN{
21  private:
22  #if defined(KEYGEN_LINUX)
23  timeval tv;
24  char NUMS[NUMS_MAX+1];
25  char SYMS[SYMS_MAX+1];
26  char CAPS[CAPS_MAX+1];
27  char LOWE[LOWE_MAX+1];
28  #else
29  char NUMS[NUMS_MAX+1] = "0123456789";
30  char SYMS[SYMS_MAX+1] = "!@#$^&*()-_=+[]<>,./:";
31  char CAPS[CAPS_MAX+1] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
32  char LOWE[LOWE_MAX+1] = "abcdefghijklmnopqrstuvwxyz";
33  #endif
34  int pin;
35  public:
43  void init(int lpin);
44 
53  void gen_pass(void* out,int size);
54 
63  void gen_IV(void* out,int size);
64 
72  int get_type();
73 
81  void printArray(char output[],int sizel);
82  #if defined(KEYGEN_LINUX)
83 
88  double millis();
89 
97  long int rpi_rand(int x);
98  #endif
99 };
100 
149 #endif //Keygen
150 
151 
char LOWE[LOWE_MAX+1]
Definition: KEYGEN.h:27
void gen_pass(void *out, int size)
Definition: KEYGEN.cpp:17
double millis()
Definition: KEYGEN.cpp:63
char CAPS[CAPS_MAX+1]
Definition: KEYGEN.h:26
char NUMS[NUMS_MAX+1]
Definition: KEYGEN.h:24
void printArray(char output[], int sizel)
Definition: KEYGEN.cpp:52
timeval tv
Definition: KEYGEN.h:23
long int rpi_rand(int x)
Definition: KEYGEN.cpp:70
void gen_IV(void *out, int size)
Definition: KEYGEN.cpp:37
int pin
Definition: KEYGEN.h:34
char SYMS[SYMS_MAX+1]
Definition: KEYGEN.h:25
int get_type()
Definition: KEYGEN.cpp:47
void init(int lpin)
Definition: KEYGEN.cpp:5
Definition: KEYGEN.h:20