FFmpeg
Macros | Functions | Variables
blowfish.c File Reference
#include <string.h>
#include "attributes.h"
#include "intreadwrite.h"
#include "mem.h"
#include "blowfish.h"

Go to the source code of this file.

Macros

#define F(Xl, Xr, P)
 

Functions

AVBlowfishav_blowfish_alloc (void)
 Allocate an AVBlowfish context. More...
 
av_cold void av_blowfish_init (AVBlowfish *ctx, const uint8_t *key, int key_len)
 Initialize an AVBlowfish context. More...
 
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. More...
 
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. More...
 

Variables

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

Macro Definition Documentation

◆ F

#define F (   Xl,
  Xr,
  P 
)
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 298 of file blowfish.c.

Variable Documentation

◆ orig_p

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 31 of file blowfish.c.

Referenced by av_blowfish_init().

◆ orig_s

const uint32_t orig_s[4][256]
static

Definition at line 39 of file blowfish.c.

Referenced by av_blowfish_init().

ctx
AVFormatContext * ctx
Definition: movenc.c:49
P
#define P