#include <bitset>#include <string>#include <stdlib.h>#include <stdio.h>#include <time.h>#include <iostream>Definice maker | |
| #define | UINT_LENGTH (8* sizeof(unsigned int)) |
Definice typů | |
| typedef unsigned int | uint_32 |
Výčty | |
| enum | KEY_TYPE { ENC, DEC } |
| enum | KEY_LENGTH { SHORT_, MIDDLE_, LONG_ } |
Funkce | |
| void | init_Emask () |
| void | init_Bmask () |
| void | init_mask () |
| void | write_uint (uint_32 a, ostream &out) |
| template<int LENGTH_> | |
| ostream & | operator<< (ostream &out, cLgNr_le< LENGTH_ > &l) |
| template<int LENGTH> | |
| ostream & | operator<< (ostream &out, cKey< LENGTH > &k) |
Proměnné | |
| uint_32 | MASK [UINT_LENGTH] |
| uint_32 | BMASK [UINT_LENGTH+1] |
| uint_32 | EMASK [UINT_LENGTH+1] |
|
|
délka neznaménkového integeru, pokud je !=32, program nefunguje!!! |
|
|
|
|
|
délka klíče 256/512/1024 bit |
|
|
typ klíče kódovací-dekódovací |
|
|
funkce pro inicializaci masky BMASK |
|
|
funkce pro inicializaci masky EMASK |
|
|
funkce pro inicializaci masky MASK |
|
||||||||||||||||
|
vypsiuje typ cKey po bitech v HRF, pro účely ladění |
|
||||||||||||||||
|
vypsiuje typ cLgNr_le po bitech v HRF, pro účely ladění |
|
||||||||||||
|
vytiskne po bitech uint. |
|
|
begin-mask ,maska[i] maskuje i bitu od zacatku cisla. |
|
|
end-mask ,maska[i] maskuje i bitu od konce cisla. |
|
|
maska na jednotlive bity; |
1.4.1