Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
fx_crypt_aes.cpp File Reference

(813d9ae984a99e739b99cf694a9d5b24d0a6b7a7)

#include "core/fdrm/fx_crypt.h"
#include <string.h>
#include "core/fxcrt/fx_system.h"
#include "third_party/base/check.h"
#include "third_party/base/check_op.h"
+ Include dependency graph for fx_crypt_aes.cpp:

Go to the source code of this file.

Macros

#define mulby2(x)
 
#define PUT_32BIT_MSB_FIRST(cp, value)
 
#define ADD_ROUND_KEY_4()
 
#define MOVEWORD(i)
 
#define FMAKEWORD(i)
 
#define LASTWORD(i)
 
#define FMAKEWORD(i)
 
#define LASTWORD(i)
 

Functions

void CRYPT_AESSetKey (CRYPT_aes_context *context, const uint8_t *key, uint32_t keylen)
 
void CRYPT_AESSetIV (CRYPT_aes_context *context, const uint8_t *iv)
 
void CRYPT_AESDecrypt (CRYPT_aes_context *context, uint8_t *dest, const uint8_t *src, uint32_t size)
 
void CRYPT_AESEncrypt (CRYPT_aes_context *context, uint8_t *dest, const uint8_t *src, uint32_t size)
 

Macro Definition Documentation

◆ ADD_ROUND_KEY_4

#define ADD_ROUND_KEY_4 ( )
Value:
(block[0] ^= *keysched++, block[1] ^= *keysched++, block[2] ^= *keysched++, \
block[3] ^= *keysched++)

Definition at line 432 of file fx_crypt_aes.cpp.

◆ FMAKEWORD [1/2]

#define FMAKEWORD ( i)
Value:
(newstate[i] = (E0[(block[i] >> 24) & 0xFF] ^ \
E1[(block[(i + C1) % Nb] >> 16) & 0xFF] ^ \
E2[(block[(i + C2) % Nb] >> 8) & 0xFF] ^ \
E3[block[(i + C3) % Nb] & 0xFF]))

Definition at line 436 of file fx_crypt_aes.cpp.

◆ FMAKEWORD [2/2]

#define FMAKEWORD ( i)
Value:
(newstate[i] = (D0[(block[i] >> 24) & 0xFF] ^ \
D1[(block[(i + C1) % Nb] >> 16) & 0xFF] ^ \
D2[(block[(i + C2) % Nb] >> 8) & 0xFF] ^ \
D3[block[(i + C3) % Nb] & 0xFF]))

Definition at line 436 of file fx_crypt_aes.cpp.

◆ LASTWORD [1/2]

#define LASTWORD ( i)
Value:
(newstate[i] = (Sbox[(block[i] >> 24) & 0xFF] << 24) | \
(Sbox[(block[(i + C1) % Nb] >> 16) & 0xFF] << 16) | \
(Sbox[(block[(i + C2) % Nb] >> 8) & 0xFF] << 8) | \
(Sbox[(block[(i + C3) % Nb]) & 0xFF]))

Definition at line 441 of file fx_crypt_aes.cpp.

◆ LASTWORD [2/2]

#define LASTWORD ( i)
Value:
(newstate[i] = (Sboxinv[(block[i] >> 24) & 0xFF] << 24) | \
(Sboxinv[(block[(i + C1) % Nb] >> 16) & 0xFF] << 16) | \
(Sboxinv[(block[(i + C2) % Nb] >> 8) & 0xFF] << 8) | \
(Sboxinv[(block[(i + C3) % Nb]) & 0xFF]))

Definition at line 441 of file fx_crypt_aes.cpp.

◆ MOVEWORD

#define MOVEWORD ( i)
Value:
(block[i] = newstate[i])

Definition at line 435 of file fx_crypt_aes.cpp.

◆ mulby2

#define mulby2 ( x)
Value:
(((x & 0x7F) << 1) ^ (x & 0x80 ? 0x1B : 0))
GLint GLint GLint GLint GLint x
[0]

Definition at line 15 of file fx_crypt_aes.cpp.

◆ PUT_32BIT_MSB_FIRST

#define PUT_32BIT_MSB_FIRST ( cp,
value )
Value:
do { \
(cp)[3] = (value); \
(cp)[2] = (value) >> 8; \
(cp)[1] = (value) >> 16; \
(cp)[0] = (value) >> 24; \
} while (0)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]

Definition at line 16 of file fx_crypt_aes.cpp.

Function Documentation

◆ CRYPT_AESDecrypt()

void CRYPT_AESDecrypt ( CRYPT_aes_context * context,
uint8_t * dest,
const uint8_t * src,
uint32_t size )

Definition at line 647 of file fx_crypt_aes.cpp.

◆ CRYPT_AESEncrypt()

void CRYPT_AESEncrypt ( CRYPT_aes_context * context,
uint8_t * dest,
const uint8_t * src,
uint32_t size )

Definition at line 654 of file fx_crypt_aes.cpp.

◆ CRYPT_AESSetIV()

void CRYPT_AESSetIV ( CRYPT_aes_context * context,
const uint8_t * iv )

Definition at line 642 of file fx_crypt_aes.cpp.

References CRYPT_aes_context::iv, and CRYPT_aes_context::Nb.

◆ CRYPT_AESSetKey()

void CRYPT_AESSetKey ( CRYPT_aes_context * context,
const uint8_t * key,
uint32_t keylen )

Definition at line 636 of file fx_crypt_aes.cpp.