FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
blowfish.c File Reference
#include "libavutil/intreadwrite.h"
#include "avutil.h"
#include "common.h"
#include "blowfish.h"

Go to the source code of this file.

Macros

#define F(Xl, Xr, P)
 

Functions

av_cold void av_blowfish_init (AVBlowfish *ctx, const uint8_t *key, int key_len)
 Initialize an AVBlowfish context.
 
void av_blowfish_crypt_ecb (AVBlowfish *ctx, uint32_t *xl, uint32_t *xr, int decrypt)
 Encrypt or decrypt a buffer using a previously initialized context.
 
void av_blowfish_crypt (AVBlowfish *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt)
 Encrypt or decrypt a buffer using a previously initialized context.
 

Variables

static const uint32_t orig_p [AV_BF_ROUNDS+2]
 
static const uint32_t orig_s [4][256]
 

Macro Definition Documentation

#define F (   Xl,
  Xr,
 
)
Value:
Xr ^=((( ctx->s[0][ Xl >> 24 ] \
+ ctx->s[1][(Xl >> 16) & 0xFF])\
^ ctx->s[2][(Xl >> 8) & 0xFF])\
+ ctx->s[3][ Xl & 0xFF])\
^ P;

Definition at line 297 of file blowfish.c.

Referenced by av_blowfish_crypt_ecb().

Variable Documentation

const uint32_t orig_p[AV_BF_ROUNDS+2]
static
Initial value:
= {
0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344,
0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89,
0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C,
0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917,
0x9216D5D9, 0x8979FB1B
}

Definition at line 30 of file blowfish.c.

Referenced by av_blowfish_init().

const uint32_t orig_s[4][256]
static

Definition at line 38 of file blowfish.c.

Referenced by av_blowfish_init().