summaryrefslogtreecommitdiff
path: root/Build/source/libs/pplib/pplib-src/src/util/utilcryptdef.h
blob: d43ea2e5b53f5d5e0e8c789b50c8bc8bc4c0be43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

#ifndef UTIL_CRYPTDEF_H
#define UTIL_CRYPTDEF_H

struct rc4_state {
  union {
    rc4_map *map;
    uint8_t *smap;
  };
  int i, j;
  int flush;
  int flags;
};

struct aes_state {
  size_t keylength;
  int rounds;
  //int keywords;
  union {
    aes_block block;
    uint8_t data[16];
  };
  aes_keyblock *keyblock;
  uint8_t iv[16];
  uint8_t buffered;
  int flush;
  int flags;
};

typedef union { rc4_state *rc4state; aes_state *aesstate; void *voidstate; } crypt_state_pointer; // to avoid 'dereferencing type-puned ...' warnings

#endif