webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Macros | Functions
cast.c File Reference
#include <openssl/cast.h>
#include "internal.h"
#include "../macros.h"

Macros

#define ROTL(a, n)   ((((a) << (n)) | ((a) >> ((-(n))&31))) & 0xffffffffL)
 
#define E_CAST(n, key, L, R, OP1, OP2, OP3)
 
#define CAST_exp(l, A, a, n)
 
#define S4   CAST_S_table4
 
#define S5   CAST_S_table5
 
#define S6   CAST_S_table6
 
#define S7   CAST_S_table7
 

Functions

void CAST_ecb_encrypt (const uint8_t *in, uint8_t *out, const CAST_KEY *ks, int enc)
 
void CAST_encrypt (uint32_t *data, const CAST_KEY *key)
 
void CAST_decrypt (uint32_t *data, const CAST_KEY *key)
 
void CAST_cbc_encrypt (const uint8_t *in, uint8_t *out, long length, const CAST_KEY *ks, uint8_t *iv, int enc)
 
void CAST_set_key (CAST_KEY *key, size_t len, const uint8_t *data)
 
void CAST_cfb64_encrypt (const uint8_t *in, uint8_t *out, long length, const CAST_KEY *schedule, uint8_t *ivec, int *num, int enc)
 

Macro Definition Documentation

◆ CAST_exp

#define CAST_exp (   l,
  A,
  a,
  n 
)
Value:
A[n / 4] = l; \
a[n + 3] = (l)&0xff; \
a[n + 2] = (l >> 8) & 0xff; \
a[n + 1] = (l >> 16) & 0xff; \
a[n + 0] = (l >> 24) & 0xff;
EGLStreamKHR EGLint n
Definition: eglext.h:984
Definition: gcc-loops.cpp:33

◆ E_CAST

#define E_CAST (   n,
  key,
  L,
  R,
  OP1,
  OP2,
  OP3 
)
Value:
{ \
uint32_t a, b, c, d; \
t = (key[n * 2] OP1 R) & 0xffffffff; \
t = ROTL(t, (key[n * 2 + 1])); \
a = CAST_S_table0[(t >> 8) & 0xff]; \
b = CAST_S_table1[(t)&0xff]; \
c = CAST_S_table2[(t >> 24) & 0xff]; \
d = CAST_S_table3[(t >> 16) & 0xff]; \
L ^= (((((a OP2 b)&0xffffffffL)OP3 c) & 0xffffffffL)OP1 d) & 0xffffffffL; \
}
#define ROTL(a, n)
Definition: cast.c:87
int c
Definition: cpp_unittests.cpp:275
bool t
Definition: UpdateContents.py:37
const uint32_t CAST_S_table0[256]
Definition: cast_tables.c:62
const uint32_t CAST_S_table2[256]
Definition: cast_tables.c:154
EGLStreamKHR EGLint n
Definition: eglext.h:984
const uint32_t CAST_S_table3[256]
Definition: cast_tables.c:200
GLboolean GLboolean GLboolean GLboolean a
Definition: gl2ext.h:306
const uint32_t CAST_S_table1[256]
Definition: cast_tables.c:108
GLboolean GLboolean GLboolean b
Definition: gl2ext.h:306
#define R(x)
Definition: mangle.cgi.c:21
CFArrayRef CFTypeRef key
Definition: AVFoundationCFSoftLinking.h:129
#define d
Definition: float-mm.c:30

◆ ROTL

#define ROTL (   a,
  n 
)    ((((a) << (n)) | ((a) >> ((-(n))&31))) & 0xffffffffL)

◆ S4

#define S4   CAST_S_table4

◆ S5

#define S5   CAST_S_table5

◆ S6

#define S6   CAST_S_table6

◆ S7

#define S7   CAST_S_table7

Function Documentation

◆ CAST_cbc_encrypt()

void CAST_cbc_encrypt ( const uint8_t in,
uint8_t out,
long  length,
const CAST_KEY ks,
uint8_t iv,
int  enc 
)

◆ CAST_cfb64_encrypt()

void CAST_cfb64_encrypt ( const uint8_t in,
uint8_t out,
long  length,
const CAST_KEY schedule,
uint8_t ivec,
int *  num,
int  enc 
)

◆ CAST_decrypt()

void CAST_decrypt ( uint32_t data,
const CAST_KEY key 
)

◆ CAST_ecb_encrypt()

void CAST_ecb_encrypt ( const uint8_t in,
uint8_t out,
const CAST_KEY ks,
int  enc 
)

◆ CAST_encrypt()

void CAST_encrypt ( uint32_t data,
const CAST_KEY key 
)

◆ CAST_set_key()

void CAST_set_key ( CAST_KEY key,
size_t  len,
const uint8_t data 
)