CMGDK r49-rc2
组合类型 | 名字空间 | 宏定义 | 函数
K:/CMGDKv18/SDK/Source/Base/Algorithml/aes.cpp文件参考
#include <hgl/type/DataType.H>

组合类型

struct  aes_context

名字空间

namespace  hgl
 

__MAKE_HGL__&&!__MAKE_PLUGIN__


宏定义

#define FT
#define V(a, b, c, d)   0x##a##b##c##d
#define V(a, b, c, d)   0x##d##a##b##c
#define V(a, b, c, d)   0x##c##d##a##b
#define V(a, b, c, d)   0x##b##c##d##a
#define RT
#define V(a, b, c, d)   0x##a##b##c##d
#define V(a, b, c, d)   0x##d##a##b##c
#define V(a, b, c, d)   0x##c##d##a##b
#define V(a, b, c, d)   0x##b##c##d##a
#define GET_UINT32(n, b, i)
#define PUT_UINT32(n, b, i)
#define FROUND(X0, X1, X2, X3, Y0, Y1, Y2, Y3)
#define RROUND(X0, X1, X2, X3, Y0, Y1, Y2, Y3)

函数

int aes_set_key (struct aes_context *ctx, unsigned char *key, int nbits)
void aes_encrypt (struct aes_context *ctx, unsigned char data[16])
void aes_decrypt (struct aes_context *ctx, unsigned char data[16])
void hgl::AesEncrypt (uint8[16], uint8 *, int)
void hgl::AesDecrypt (uint8[16], uint8 *, int)

宏定义文档

#define FROUND (   X0,
  X1,
  X2,
  X3,
  Y0,
  Y1,
  Y2,
  Y3 
)
值:
{                                               \
    RK += 4;                                    \
                                                \
    X0 = RK[0] ^ FT0[ (unsigned __int8) ( Y0 >> 24 ) ] ^  \
                 FT1[ (unsigned __int8) ( Y1 >> 16 ) ] ^  \
                 FT2[ (unsigned __int8) ( Y2 >>  8 ) ] ^  \
                 FT3[ (unsigned __int8) ( Y3       ) ];   \
                                                \
    X1 = RK[1] ^ FT0[ (unsigned __int8) ( Y1 >> 24 ) ] ^  \
                 FT1[ (unsigned __int8) ( Y2 >> 16 ) ] ^  \
                 FT2[ (unsigned __int8) ( Y3 >>  8 ) ] ^  \
                 FT3[ (unsigned __int8) ( Y0       ) ];   \
                                                \
    X2 = RK[2] ^ FT0[ (unsigned __int8) ( Y2 >> 24 ) ] ^  \
                 FT1[ (unsigned __int8) ( Y3 >> 16 ) ] ^  \
                 FT2[ (unsigned __int8) ( Y0 >>  8 ) ] ^  \
                 FT3[ (unsigned __int8) ( Y1       ) ];   \
                                                \
    X3 = RK[3] ^ FT0[ (unsigned __int8) ( Y3 >> 24 ) ] ^  \
                 FT1[ (unsigned __int8) ( Y0 >> 16 ) ] ^  \
                 FT2[ (unsigned __int8) ( Y1 >>  8 ) ] ^  \
                 FT3[ (unsigned __int8) ( Y2       ) ];   \
}
#define FT
#define GET_UINT32 (   n,
  b,
 
)
值:
{                                               \
    (n) = ( (unsigned __int32) (b)[(i)    ] << 24 )       \
        | ( (unsigned __int32) (b)[(i) + 1] << 16 )       \
        | ( (unsigned __int32) (b)[(i) + 2] <<  8 )       \
        | ( (unsigned __int32) (b)[(i) + 3]       );      \
}
#define PUT_UINT32 (   n,
  b,
 
)
值:
{                                               \
    (b)[(i)    ] = (unsigned __int8) ( (n) >> 24 );       \
    (b)[(i) + 1] = (unsigned __int8) ( (n) >> 16 );       \
    (b)[(i) + 2] = (unsigned __int8) ( (n) >>  8 );       \
    (b)[(i) + 3] = (unsigned __int8) ( (n)       );       \
}
#define RROUND (   X0,
  X1,
  X2,
  X3,
  Y0,
  Y1,
  Y2,
  Y3 
)
值:
{                                               \
    RK += 4;                                    \
                                                \
    X0 = RK[0] ^ RT0[ (unsigned __int8) ( Y0 >> 24 ) ] ^  \
                 RT1[ (unsigned __int8) ( Y3 >> 16 ) ] ^  \
                 RT2[ (unsigned __int8) ( Y2 >>  8 ) ] ^  \
                 RT3[ (unsigned __int8) ( Y1       ) ];   \
                                                \
    X1 = RK[1] ^ RT0[ (unsigned __int8) ( Y1 >> 24 ) ] ^  \
                 RT1[ (unsigned __int8) ( Y0 >> 16 ) ] ^  \
                 RT2[ (unsigned __int8) ( Y3 >>  8 ) ] ^  \
                 RT3[ (unsigned __int8) ( Y2       ) ];   \
                                                \
    X2 = RK[2] ^ RT0[ (unsigned __int8) ( Y2 >> 24 ) ] ^  \
                 RT1[ (unsigned __int8) ( Y1 >> 16 ) ] ^  \
                 RT2[ (unsigned __int8) ( Y0 >>  8 ) ] ^  \
                 RT3[ (unsigned __int8) ( Y3       ) ];   \
                                                \
    X3 = RK[3] ^ RT0[ (unsigned __int8) ( Y3 >> 24 ) ] ^  \
                 RT1[ (unsigned __int8) ( Y2 >> 16 ) ] ^  \
                 RT2[ (unsigned __int8) ( Y1 >>  8 ) ] ^  \
                 RT3[ (unsigned __int8) ( Y0       ) ];   \
}
#define RT
#define V (   a,
  b,
  c,
 
)    0x##c##d##a##b
#define V (   a,
  b,
  c,
 
)    0x##d##a##b##c
#define V (   a,
  b,
  c,
 
)    0x##d##a##b##c
#define V (   a,
  b,
  c,
 
)    0x##b##c##d##a
#define V (   a,
  b,
  c,
 
)    0x##a##b##c##d
#define V (   a,
  b,
  c,
 
)    0x##c##d##a##b
#define V (   a,
  b,
  c,
 
)    0x##b##c##d##a
#define V (   a,
  b,
  c,
 
)    0x##a##b##c##d

函数文档

void aes_decrypt ( struct aes_context ctx,
unsigned char  data[16] 
)
void aes_encrypt ( struct aes_context ctx,
unsigned char  data[16] 
)
int aes_set_key ( struct aes_context ctx,
unsigned char *  key,
int  nbits 
)
 全部  名字空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义