`
bigboy菠萝的海
  • 浏览: 35458 次
社区版块
存档分类
最新评论

jt/t809加密算法

阅读更多
Const unsigned uint32_t M1  =A;
Const unsigned uint32_t IA1 =B;
Const unsigned uint32_t IC1 =C;
Void encrypt(uint32_t key, unsigned char* buffer, uint32_t size )
{
uint32_t idx = 0;
if( 0 = = key )
{
key = 1;
}
uint32_t mkey = M1;
if (0 = = mkey )
{
    mkey = 1;
}
while( idx < size )
{
key = IA1 * ( key % mkey ) + IC1;
buffer[idx++] ^= (unsigned char)((key>>20)&0xFF);
}
}

 

网关程序下载地址: 

http://download.csdn.net/detail/gaoshbo/9340739

 

分享到:
评论
1 楼 yuchang123 2016-12-12  
<h1> </h1>

相关推荐

Global site tag (gtag.js) - Google Analytics