TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
Classes | Macros | Typedefs | Functions
aes.h File Reference
#include <stddef.h>

Go to the source code of this file.

Classes

struct  aes_key_st
 

Macros

#define AES_ENCRYPT   1
 
#define AES_DECRYPT   0
 
#define AES_MAXNR   14
 
#define AES_BLOCK_SIZE   16
 

Typedefs

typedef struct aes_key_st AES_KEY
 

Functions

const char * AES_options (void)
 
int AES_set_encrypt_key (const unsigned char *userKey, const int bits, AES_KEY *key)
 Expand the cipher key into the encryption key schedule. More...
 
int AES_set_decrypt_key (const unsigned char *userKey, const int bits, AES_KEY *key)
 Expand the cipher key into the decryption key schedule. More...
 
void AES_encrypt (const unsigned char *in, unsigned char *out, const AES_KEY *key)
 
void AES_decrypt (const unsigned char *in, unsigned char *out, const AES_KEY *key)
 
void AES_ecb_encrypt (const unsigned char *in, unsigned char *out, const AES_KEY *key, const int enc)
 
void AES_cbc_encrypt (const unsigned char *in, unsigned char *out, size_t length, const AES_KEY *key, unsigned char *ivec, const int enc)
 
void AES_cfb128_encrypt (const unsigned char *in, unsigned char *out, size_t length, const AES_KEY *key, unsigned char *ivec, int *num, const int enc)
 
void AES_cfb1_encrypt (const unsigned char *in, unsigned char *out, size_t length, const AES_KEY *key, unsigned char *ivec, int *num, const int enc)
 
void AES_cfb8_encrypt (const unsigned char *in, unsigned char *out, size_t length, const AES_KEY *key, unsigned char *ivec, int *num, const int enc)
 
void AES_ofb128_encrypt (const unsigned char *in, unsigned char *out, size_t length, const AES_KEY *key, unsigned char *ivec, int *num)
 
void AES_ige_encrypt (const unsigned char *in, unsigned char *out, size_t length, const AES_KEY *key, unsigned char *ivec, const int enc)
 
void AES_bi_ige_encrypt (const unsigned char *in, unsigned char *out, size_t length, const AES_KEY *key, const AES_KEY *key2, const unsigned char *ivec, const int enc)
 
int AES_wrap_key (AES_KEY *key, const unsigned char *iv, unsigned char *out, const unsigned char *in, unsigned int inlen)
 
int AES_unwrap_key (AES_KEY *key, const unsigned char *iv, unsigned char *out, const unsigned char *in, unsigned int inlen)
 

Macro Definition Documentation

#define AES_BLOCK_SIZE   16

Definition at line 27 of file aes.h.

Referenced by QAlgorithm::Aes::encryptCBC(), and QAlgorithm::Aes::encryptECB().

#define AES_DECRYPT   0

Definition at line 20 of file aes.h.

Referenced by AES_ecb_encrypt(), QAlgorithm::Aes::decryptCBC(), and QAlgorithm::Aes::decryptECB().

#define AES_ENCRYPT   1

Definition at line 19 of file aes.h.

Referenced by AES_ecb_encrypt(), QAlgorithm::Aes::encryptCBC(), and QAlgorithm::Aes::encryptECB().

#define AES_MAXNR   14

Definition at line 26 of file aes.h.

Typedef Documentation

typedef struct aes_key_st AES_KEY

Definition at line 38 of file aes.h.

Function Documentation

void AES_bi_ige_encrypt ( const unsigned char *  in,
unsigned char *  out,
size_t  length,
const AES_KEY key,
const AES_KEY key2,
const unsigned char *  ivec,
const int  enc 
)
void AES_cbc_encrypt ( const unsigned char *  in,
unsigned char *  out,
size_t  length,
const AES_KEY key,
unsigned char *  ivec,
const int  enc 
)
void AES_cfb128_encrypt ( const unsigned char *  in,
unsigned char *  out,
size_t  length,
const AES_KEY key,
unsigned char *  ivec,
int num,
const int  enc 
)
void AES_cfb1_encrypt ( const unsigned char *  in,
unsigned char *  out,
size_t  length,
const AES_KEY key,
unsigned char *  ivec,
int num,
const int  enc 
)
void AES_cfb8_encrypt ( const unsigned char *  in,
unsigned char *  out,
size_t  length,
const AES_KEY key,
unsigned char *  ivec,
int num,
const int  enc 
)
void AES_decrypt ( const unsigned char *  in,
unsigned char *  out,
const AES_KEY key 
)

Definition at line 983 of file aes_core.cpp.

References GETU32, PUTU32, aes_key_st::rd_key, aes_key_st::rounds, Td0, Td1, Td2, Td3, and Td4.

Referenced by AES_cbc_encrypt(), and AES_ecb_encrypt().

void AES_ecb_encrypt ( const unsigned char *  in,
unsigned char *  out,
const AES_KEY key,
const int  enc 
)
void AES_encrypt ( const unsigned char *  in,
unsigned char *  out,
const AES_KEY key 
)

Definition at line 792 of file aes_core.cpp.

References GETU32, PUTU32, aes_key_st::rd_key, aes_key_st::rounds, Te0, Te1, Te2, and Te3.

Referenced by AES_cbc_encrypt(), and AES_ecb_encrypt().

void AES_ige_encrypt ( const unsigned char *  in,
unsigned char *  out,
size_t  length,
const AES_KEY key,
unsigned char *  ivec,
const int  enc 
)
void AES_ofb128_encrypt ( const unsigned char *  in,
unsigned char *  out,
size_t  length,
const AES_KEY key,
unsigned char *  ivec,
int num 
)
const char* AES_options ( void  )
int AES_set_decrypt_key ( const unsigned char *  userKey,
const int  bits,
AES_KEY key 
)

Expand the cipher key into the decryption key schedule.

Definition at line 732 of file aes_core.cpp.

References AES_set_encrypt_key(), aes_key_st::rd_key, aes_key_st::rounds, Td0, Td1, Td2, Td3, and Te1.

Referenced by QAlgorithm::Aes::decryptCBC(), and QAlgorithm::Aes::decryptECB().

int AES_set_encrypt_key ( const unsigned char *  userKey,
const int  bits,
AES_KEY key 
)

Expand the cipher key into the encryption key schedule.

Definition at line 631 of file aes_core.cpp.

References GETU32, rcon, aes_key_st::rd_key, aes_key_st::rounds, Te0, Te1, Te2, and Te3.

Referenced by AES_set_decrypt_key(), QAlgorithm::Aes::encryptCBC(), and QAlgorithm::Aes::encryptECB().

int AES_unwrap_key ( AES_KEY key,
const unsigned char *  iv,
unsigned char *  out,
const unsigned char *  in,
unsigned int  inlen 
)
int AES_wrap_key ( AES_KEY key,
const unsigned char *  iv,
unsigned char *  out,
const unsigned char *  in,
unsigned int  inlen 
)