cryptlib  3.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
Macros | Functions
rc4enc.c File Reference
#include "crypt/osconfig.h"
#include "crypt/rc4.h"
#include "crypt/rc4locl.h"

Go to the source code of this file.

Macros

#define LOOP(in, out)
 
#define RC4_LOOP(a, b, i)   LOOP(*((a)++),*((b)++))
 

Functions

void RC4 (RC4_KEY *key, unsigned long len, const unsigned char *indata, unsigned char *outdata)
 

Macro Definition Documentation

#define LOOP (   in,
  out 
)
Value:
x=((x+1)&0xff); \
tx=d[x]; \
y=(tx+y)&0xff; \
d[x]=ty=d[y]; \
d[y]=tx; \
(out) = d[(tx+ty)&0xff]^ (in);
#define RC4_LOOP (   a,
  b,
 
)    LOOP(*((a)++),*((b)++))

Function Documentation

void RC4 ( RC4_KEY key,
unsigned long  len,
const unsigned char *  indata,
unsigned char *  outdata 
)

Definition at line 77 of file rc4enc.c.