OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions
rc4_enc.c File Reference
#include <openssl/rc4.h>
#include "rc4_locl.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, size_t 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,
size_t  len,
const unsigned char *  indata,
unsigned char *  outdata 
)

Definition at line 70 of file rc4_enc.c.