TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
Functions | Variables
aes_core.cpp File Reference
#include <assert.h>
#include "aes.h"
#include "aes_locl.h"

Go to the source code of this file.

Functions

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)
 

Variables

static const u32 Te0 [256]
 rijndael-alg-fst.c More...
 
static const u32 Te1 [256]
 
static const u32 Te2 [256]
 
static const u32 Te3 [256]
 
static const u32 Td0 [256]
 
static const u32 Td1 [256]
 
static const u32 Td2 [256]
 
static const u32 Td3 [256]
 
static const u8 Td4 [256]
 
static const u32 rcon []
 

Function Documentation

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_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().

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().

Variable Documentation

const u32 rcon[]
static
Initial value:
= {
0x01000000, 0x02000000, 0x04000000, 0x08000000,
0x10000000, 0x20000000, 0x40000000, 0x80000000,
0x1B000000,
0x36000000,
}

Definition at line 621 of file aes_core.cpp.

Referenced by AES_set_encrypt_key().

const u32 Td0[256]
static

Definition at line 323 of file aes_core.cpp.

Referenced by AES_decrypt(), and AES_set_decrypt_key().

const u32 Td1[256]
static

Definition at line 389 of file aes_core.cpp.

Referenced by AES_decrypt(), and AES_set_decrypt_key().

const u32 Td2[256]
static

Definition at line 455 of file aes_core.cpp.

Referenced by AES_decrypt(), and AES_set_decrypt_key().

const u32 Td3[256]
static

Definition at line 521 of file aes_core.cpp.

Referenced by AES_decrypt(), and AES_set_decrypt_key().

const u8 Td4[256]
static

Definition at line 587 of file aes_core.cpp.

Referenced by AES_decrypt().

const u32 Te0[256]
static

rijndael-alg-fst.c

Version
3.0 (December 2000)

Optimised ANSI C code for the Rijndael cipher (now AES)

Author
Vincent Rijmen vince.nosp@m.nt.r.nosp@m.ijmen.nosp@m.@esa.nosp@m.t.kul.nosp@m.euve.nosp@m.n.ac..nosp@m.be
Antoon Bosselaers antoo.nosp@m.n.bo.nosp@m.ssela.nosp@m.ers@.nosp@m.esat..nosp@m.kule.nosp@m.uven..nosp@m.ac.b.nosp@m.e
Paulo Barreto paulo.nosp@m..bar.nosp@m.reto@.nosp@m.terr.nosp@m.a.com.nosp@m..br

This code is hereby placed in the public domain.

THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition at line 58 of file aes_core.cpp.

Referenced by AES_encrypt(), and AES_set_encrypt_key().

const u32 Te1[256]
static

Definition at line 124 of file aes_core.cpp.

Referenced by AES_encrypt(), AES_set_decrypt_key(), and AES_set_encrypt_key().

const u32 Te2[256]
static

Definition at line 190 of file aes_core.cpp.

Referenced by AES_encrypt(), and AES_set_encrypt_key().

const u32 Te3[256]
static

Definition at line 256 of file aes_core.cpp.

Referenced by AES_encrypt(), and AES_set_encrypt_key().