91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 3KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-24
  • 語言: 其他
  • 標(biāo)簽: hash??sm3??國標(biāo)??

資源簡介

從GMSSL整理出來的SM3哈希算法,文件只有sm3.c test.c兩個(gè),其它文件需要自行安裝openssl,內(nèi)有makefile,可直接編譯,修改CROSS_COMPIER_PREFIX的值即可編譯成不同的平臺使用。

資源截圖

代碼片段和文件信息

/*?====================================================================
?*?Copyright?(c)?2014?-?2017?The?GmSSL?Project.??All?rights?reserved.
?*
?*?Redistribution?and?use?in?source?and?binary?forms?with?or?without
?*?modification?are?permitted?provided?that?the?following?conditions
?*?are?met:
?*
?*?1.?Redistributions?of?source?code?must?retain?the?above?copyright
?*????notice?this?list?of?conditions?and?the?following?disclaimer.
?*
?*?2.?Redistributions?in?binary?form?must?reproduce?the?above?copyright
?*????notice?this?list?of?conditions?and?the?following?disclaimer?in
?*????the?documentation?and/or?other?materials?provided?with?the
?*????distribution.
?*
?*?3.?All?advertising?materials?mentioning?features?or?use?of?this
?*????software?must?display?the?following?acknowledgment:
?*????“This?product?includes?software?developed?by?the?GmSSL?Project.
?*????(http://gmssl.org/)“
?*
?*?4.?The?name?“GmSSL?Project“?must?not?be?used?to?endorse?or?promote
?*????products?derived?from?this?software?without?prior?written
?*????permission.?For?written?permission?please?contact
?*????guanzhi1980@gmail.com.
?*
?*?5.?Products?derived?from?this?software?may?not?be?called?“GmSSL“
?*????nor?may?“GmSSL“?appear?in?their?names?without?prior?written
?*????permission?of?the?GmSSL?Project.
?*
?*?6.?Redistributions?of?any?form?whatsoever?must?retain?the?following
?*????acknowledgment:
?*????“This?product?includes?software?developed?by?the?GmSSL?Project
?*????(http://gmssl.org/)“
?*
?*?THIS?SOFTWARE?IS?PROVIDED?BY?THE?GmSSL?PROJECT?‘‘AS?IS‘‘?AND?ANY
?*?EXPRESSED?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?GmSSL?PROJECT?OR
?*?ITS?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.
?*?====================================================================
?*/

#include?
#include?
#include?“internal/byteorder.h“

void?sm3_init(sm3_ctx_t?*ctx)
{
ctx->digest[0]?=?0x7380166F;
ctx->digest[1]?=?0x4914B2B9;
ctx->digest[2]?=?0x172442D7;
ctx->digest[3]?=?0xDA8A0600;
ctx->digest[4]?=?0xA96F30BC;
ctx->digest[5]?=?0x163138AA;
ctx->digest[6]?=?0xE38DEE4D;
ctx->digest[7]?=?0xB0FB0E4E;

ctx->nblocks?=?0;
ctx->num?=?0;
}

void?sm3_update(sm3_ctx_t?*ctx?const?unsigned?char*?data?size_t?data_len)
{
if?(ctx->num)?{
unsigned?int?left?=?SM3_BLOCK_SIZE?-?ctx->num;
if?(data_len? memcpy(ctx->block?+?ctx->num?data?data_len);
ctx->num?+=?data_len;
return;
}?else?{
mem

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????1039??2018-12-12?17:54??SM3-me\sm3test.c

?????文件???????1000??2018-12-11?17:54??SM3-me\Makefile

?????文件???????6204??2018-12-12?13:35??SM3-me\sm3.c

?????目錄??????????0??2018-12-12?17:55??SM3-me

-----------?---------??----------?-----??----

?????????????????8243????????????????????4


評論

共有 條評論