blob: 93e0eafe6b85806d2c2582ffb32c8ffa01400107 (
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
|
/* cipher-glfsr.h - galois linear feedback shifting register include file
*
* -scut
*/
#ifndef CIPHER_GLFSR_H
#define CIPHER_GLFSR_H
/* glfsr_crypt
*
* main encryption and decryption function. its a symmetric 32bit key stream
* cipher. it is not secure, only used here for obfuscation. the same key is
* used for encryption and decryption.
* encrypt 'len' bytes from 'src' to 'dst' with key 'key'. 'src' and 'dst' can
* overlap as they want, only if 'src' >= 'dst'.
*
* return in any case
*/
void
glfsr_crypt (unsigned char *dest, unsigned char *src,
unsigned int len, unsigned int key);
#endif
|