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

组合类型

struct  sha1_context

名字空间

namespace  hgl
 

__MAKE_HGL__&&!__MAKE_PLUGIN__


宏定义

#define GET32(n, b, i)
#define PUT32(n, b, i)
#define S(x, n)   ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n)))
#define R(t)
#define P(a, b, c, d, e, x)
#define F(x, y, z)   (z ^ (x & (y ^ z)))
#define K   0x5A827999
#define F(x, y, z)   (x ^ y ^ z)
#define K   0x6ED9EBA1
#define F(x, y, z)   ((x & y) | (z & (x | y)))
#define K   0x8F1BBCDC
#define F(x, y, z)   (x ^ y ^ z)
#define K   0xCA62C1D6

函数

void sha1_starts (struct sha1_context *ctx)
void sha1_process (struct sha1_context *ctx, unsigned __int8 data[64])
void sha1_update (struct sha1_context *ctx, unsigned __int8 *input, unsigned __int32 length)
void sha1_finish (struct sha1_context *ctx, unsigned __int8 digest[20])
void hgl::CountSHA1 (uint8 *, uint32, uint8[20])

宏定义文档

#define F (   x,
  y,
  z 
)    (z ^ (x & (y ^ z)))
#define F (   x,
  y,
  z 
)    (x ^ y ^ z)
#define F (   x,
  y,
  z 
)    ((x & y) | (z & (x | y)))
#define F (   x,
  y,
  z 
)    (x ^ y ^ z)
#define GET32 (   n,
  b,
 
)
值:
{                                                               \
    (n) = (unsigned __int32) ((unsigned __int8 *) b)[(i)+3]                         \
      | (((unsigned __int32) ((unsigned __int8 *) b)[(i)+2]) <<  8)                 \
      | (((unsigned __int32) ((unsigned __int8 *) b)[(i)+1]) << 16)                 \
      | (((unsigned __int32) ((unsigned __int8 *) b)[(i)]  ) << 24);                \
}
#define K   0x6ED9EBA1
#define K   0xCA62C1D6
#define K   0x5A827999
#define K   0x8F1BBCDC
#define P (   a,
  b,
  c,
  d,
  e,
  x 
)
值:
{                                                       \
    e += S(a,5) + F(b,c,d) + K + x; b = S(b,30);        \
}
#define PUT32 (   n,
  b,
 
)
值:
{                                                               \
    (((unsigned __int8 *) b)[(i)+3]) = (unsigned __int8) (((n)      ) & 0xFF);      \
    (((unsigned __int8 *) b)[(i)+2]) = (unsigned __int8) (((n) >>  8) & 0xFF);      \
    (((unsigned __int8 *) b)[(i)+1]) = (unsigned __int8) (((n) >> 16) & 0xFF);      \
    (((unsigned __int8 *) b)[(i)]  ) = (unsigned __int8) (((n) >> 24) & 0xFF);      \
}
#define R (   t)
值:
(                                                       \
    temp = W[(t -  3) & 0x0F] ^ W[(t - 8) & 0x0F] ^     \
           W[(t - 14) & 0x0F] ^ W[ t      & 0x0F],      \
    ( W[t & 0x0F] = S(temp,1) )                         \
)
#define S (   x,
  n 
)    ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n)))

函数文档

void sha1_finish ( struct sha1_context ctx,
unsigned __int8  digest[20] 
)
void sha1_process ( struct sha1_context ctx,
unsigned __int8  data[64] 
)
void sha1_starts ( struct sha1_context ctx)
void sha1_update ( struct sha1_context ctx,
unsigned __int8 *  input,
unsigned __int32  length 
)
 全部  名字空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义