亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sha1.c

?? LINUX AU12XX BOOTLADER
?? C
字號:
/*http://sea-to-sky.net/~sreid/sha1.c@(#) Sep 21 2004, 15:03:04SHA-1 in CBy Steve Reid <sreid@sea-to-sky.net>100% Public DomainWARNING!! The update functions destroys the buffer! (RW)-----------------Modified 7/98 By James H. Brown <jbrown@burgoyne.com>Still 100% Public DomainCorrected a problem which generated improper hash values on 16 bit machinesRoutine SHA1Update changed from	void SHA1Update(SHA1_CTX* context,			unsigned char* data, unsigned int len)to	void SHA1Update(SHA1_CTX* context,			unsigned char* data, unsigned long len)The 'len' parameter was declared an int which works fine on 32 bitmachines. However, on 16 bit machines an int is too small for the shiftsbeing done against it.  This caused the hash function to generateincorrect values if len was greater than 8191 (8K - 1) due to the 'len<< 3' on line 3 of SHA1Update().Since the file IO in main() reads 16K at a time, any file 8K or largerwould be guaranteed to generate the wrong hash (e.g. Test Vector #3, amillion "a"s).I also changed the declaration of variables i & j in SHA1Update tounsigned long from unsigned int for the same reason.These changes should make no difference to any 32 bit implementationssince an int and a long are the same size in those environments.--I also corrected a few compiler warnings generated by Borland C.1. Added #include <process.h> for exit() prototype2. Removed unused variable 'j' in SHA1Final3. Changed exit(0) to return(0) at end of main.ALL changes I made can be located by searching for comments containing 'JHB'-----------------Modified 8/98By Steve Reid <sreid@sea-to-sky.net>Still 100% public domain1- Removed #include <process.h> and used return() instead of exit()2- Fixed overwriting of finalcount in SHA1Final() (discovered by Chris Hall)3- Changed email address from steve@edmweb.com to sreid@sea-to-sky.net-----------------Modified 4/01By Saul Kravitz <Saul.Kravitz@celera.com>Still 100% PDModified to run on Compaq Alpha hardware.  -----------------Modified 8/04By Reinhard Wobst (RW, r.wobst@gmx.de) - removing unrolled loopin SHA1Transform() for reducing code sizeStill 100% PD*//*Test Vectors (from FIPS PUB 180-1)"abc"  A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"  84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1A million repetitions of "a"  34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F*//* #define SHA1HANDSOFF  */#include <string.h>#include "sha1.h"#ifdef EL#define LITTLE_ENDIAN#endif#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))/* blk0() and blk() perform the initial expand. *//* I got the idea of expanding during the round function from SSLeay */#ifdef LITTLE_ENDIAN#define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \		 |(rol(block->l[i],8)&0x00FF00FF))#else#define blk0(i) block->l[i]#endif#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \				     ^block->l[(i+2)&15]^block->l[i&15],1))/* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */#define R0(v,w,x,y,z,i) \  z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30);#define R1(v,w,x,y,z,i) \  z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30);#define R2(v,w,x,y,z,i) \  z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30);#define R3(v,w,x,y,z,i) \  z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30);#define R4(v,w,x,y,z,i) \  z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);/* Hash a single 512-bit block. This is the core of the algorithm. */#define RW_NOT_UNROLL_THE_LOOPS_BECAUSE_OF_SMALLER_CODESZEstatic void SHA1Transform(uint32 state[5], unsigned char buffer[64]){#ifdef RW_NOT_UNROLL_THE_LOOPS_BECAUSE_OF_SMALLER_CODESZE    uint32 a[5];    register int n, N;#else    uint32 a, b, c, d, e;#endif    typedef union {	unsigned char c[64];	uint32 l[16];    } CHAR64LONG16;#if 0    CHAR64LONG16 *block;    block = (CHAR64LONG16 *) buffer;#else    /* AMD CHANGE:     * \par     * This fixes the problem with unaligned      * Int32 accesses on MIPS M4K     * If the address of buffer is not a      * valid 32 bit addr, the cpu raises a      * exception.      */    CHAR64LONG16 blkinstance;    CHAR64LONG16 *block;    memcpy(&blkinstance, buffer, 64);    block = &blkinstance;#endif    /* Copy context->state[] to working vars */#ifdef RW_NOT_UNROLL_THE_LOOPS_BECAUSE_OF_SMALLER_CODESZE    for (n = 5; n--;)	a[n] = state[n];#else    a = state[0];    b = state[1];    c = state[2];    d = state[3];    e = state[4];#endif    /* 4 rounds of 20 operations each. Loop unrolled. */    /* *** RW: Though I am a mathematician, I can count. It is 5 rounds of     * 16, 4, 20, 20, 20 operations each.     */#ifdef RW_NOT_UNROLL_THE_LOOPS_BECAUSE_OF_SMALLER_CODESZE    N = 80;    for (n = 0; n < 16; ++n, --N) {	R0(a[N % 5], a[(N + 1) % 5], a[(N + 2) % 5], a[(N + 3) % 5],	   a[(N + 4) % 5], n);    }    for (n = 0; n < 4; ++n, --N) {	R1(a[N % 5], a[(N + 1) % 5], a[(N + 2) % 5], a[(N + 3) % 5],	   a[(N + 4) % 5], (n + 16));    }    for (n = 0; n < 20; ++n, --N) {	R2(a[N % 5], a[(N + 1) % 5], a[(N + 2) % 5], a[(N + 3) % 5],	   a[(N + 4) % 5], (n + 20));    }    for (n = 0; n < 20; ++n, --N) {	R3(a[N % 5], a[(N + 1) % 5], a[(N + 2) % 5], a[(N + 3) % 5],	   a[(N + 4) % 5], (n + 40));    }    for (n = 0; n < 20; ++n, --N) {	R4(a[N % 5], a[(N + 1) % 5], a[(N + 2) % 5], a[(N + 3) % 5],	   a[(N + 4) % 5], (n + 60));    }#else    R0(a, b, c, d, e, 0);    R0(e, a, b, c, d, 1);    R0(d, e, a, b, c, 2);    R0(c, d, e, a, b, 3);    R0(b, c, d, e, a, 4);    R0(a, b, c, d, e, 5);    R0(e, a, b, c, d, 6);    R0(d, e, a, b, c, 7);    R0(c, d, e, a, b, 8);    R0(b, c, d, e, a, 9);    R0(a, b, c, d, e, 10);    R0(e, a, b, c, d, 11);    R0(d, e, a, b, c, 12);    R0(c, d, e, a, b, 13);    R0(b, c, d, e, a, 14);    R0(a, b, c, d, e, 15);    R1(e, a, b, c, d, 16);    R1(d, e, a, b, c, 17);    R1(c, d, e, a, b, 18);    R1(b, c, d, e, a, 19);    R2(a, b, c, d, e, 20);    R2(e, a, b, c, d, 21);    R2(d, e, a, b, c, 22);    R2(c, d, e, a, b, 23);    R2(b, c, d, e, a, 24);    R2(a, b, c, d, e, 25);    R2(e, a, b, c, d, 26);    R2(d, e, a, b, c, 27);    R2(c, d, e, a, b, 28);    R2(b, c, d, e, a, 29);    R2(a, b, c, d, e, 30);    R2(e, a, b, c, d, 31);    R2(d, e, a, b, c, 32);    R2(c, d, e, a, b, 33);    R2(b, c, d, e, a, 34);    R2(a, b, c, d, e, 35);    R2(e, a, b, c, d, 36);    R2(d, e, a, b, c, 37);    R2(c, d, e, a, b, 38);    R2(b, c, d, e, a, 39);    R3(a, b, c, d, e, 40);    R3(e, a, b, c, d, 41);    R3(d, e, a, b, c, 42);    R3(c, d, e, a, b, 43);    R3(b, c, d, e, a, 44);    R3(a, b, c, d, e, 45);    R3(e, a, b, c, d, 46);    R3(d, e, a, b, c, 47);    R3(c, d, e, a, b, 48);    R3(b, c, d, e, a, 49);    R3(a, b, c, d, e, 50);    R3(e, a, b, c, d, 51);    R3(d, e, a, b, c, 52);    R3(c, d, e, a, b, 53);    R3(b, c, d, e, a, 54);    R3(a, b, c, d, e, 55);    R3(e, a, b, c, d, 56);    R3(d, e, a, b, c, 57);    R3(c, d, e, a, b, 58);    R3(b, c, d, e, a, 59);    R4(a, b, c, d, e, 60);    R4(e, a, b, c, d, 61);    R4(d, e, a, b, c, 62);    R4(c, d, e, a, b, 63);    R4(b, c, d, e, a, 64);    R4(a, b, c, d, e, 65);    R4(e, a, b, c, d, 66);    R4(d, e, a, b, c, 67);    R4(c, d, e, a, b, 68);    R4(b, c, d, e, a, 69);    R4(a, b, c, d, e, 70);    R4(e, a, b, c, d, 71);    R4(d, e, a, b, c, 72);    R4(c, d, e, a, b, 73);    R4(b, c, d, e, a, 74);    R4(a, b, c, d, e, 75);    R4(e, a, b, c, d, 76);    R4(d, e, a, b, c, 77);    R4(c, d, e, a, b, 78);    R4(b, c, d, e, a, 79);#endif    /* Add the working vars back into context.state[] */#ifdef RW_NOT_UNROLL_THE_LOOPS_BECAUSE_OF_SMALLER_CODESZE    for (n = 5; n--;) {	state[n] += a[n];	a[n] = 0;    }#else    state[0] += a;    state[1] += b;    state[2] += c;    state[3] += d;    state[4] += e;    /* Wipe variables */    a = b = c = d = e = 0;#endif}/* SHA1Init - Initialize new context */void SHA1Init(SHA1_CTX * context){    /* SHA1 initialization constants */    context->state[0] = 0x67452301;    context->state[1] = 0xEFCDAB89;    context->state[2] = 0x98BADCFE;    context->state[3] = 0x10325476;    context->state[4] = 0xC3D2E1F0;    context->count[0] = context->count[1] = 0;}/* Run your data through this. */void SHA1Update(SHA1_CTX * context, unsigned char *data, uint32 len){    uint32 i, j;    j = (context->count[0] >> 3) & 63;    if ((context->count[0] += len << 3) < (len << 3))	context->count[1]++;    context->count[1] += (len >> 29);    if ((j + len) > 63) {	memcpy(&context->buffer[j], data, (i = 64 - j));	SHA1Transform(context->state, context->buffer);	for (; i + 63 < len; i += 64) {	    SHA1Transform(context->state, &data[i]);	}	j = 0;    } else	i = 0;    memcpy(&context->buffer[j], &data[i], len - i);}/* Add padding and return the message digest. */void SHA1Final(unsigned char digest[20], SHA1_CTX * context){    uint32 i;    unsigned char finalcount[8];    for (i = 0; i < 8; i++) {	finalcount[i] = (unsigned char) ((context->count[(i >= 4 ? 0 : 1)]					  >> ((3 - (i & 3)) * 8)) & 255);	/* Endian independent */    }    SHA1Update(context, (unsigned char *) "\200", 1);    while ((context->count[0] & 504) != 448) {	SHA1Update(context, (unsigned char *) "\0", 1);    }    SHA1Update(context, finalcount, 8);	/* Should cause a SHA1Transform() */    for (i = 0; i < 20; i++) {	digest[i] = (unsigned char)	    ((context->state[i >> 2] >> ((3 - (i & 3)) * 8)) & 255);    }    /* Wipe variables */    i = 0;			/* JHB */    memset(context->buffer, 0, 64);    memset(context->state, 0, 20);    memset(context->count, 0, 8);    memset(finalcount, 0, 8);	/* SWR */}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品色一区二区三区| 日本91福利区| 99视频超级精品| 亚洲国产精品99久久久久久久久| 国产激情视频一区二区在线观看| 中文字幕乱码一区二区免费| 国产激情视频一区二区在线观看| 久久精品一区二区三区四区| 国产尤物一区二区| 国产精品免费人成网站| 91小宝寻花一区二区三区| 亚洲免费在线播放| 欧美日韩极品在线观看一区| 蜜桃av一区二区在线观看| 精品三级av在线| 粉嫩在线一区二区三区视频| 中文字幕在线不卡| 欧美日韩在线播放三区| 国产自产高清不卡| 国产精品免费免费| 5858s免费视频成人| 激情文学综合插| 亚洲欧美偷拍卡通变态| 欧美男男青年gay1069videost| 久久精品国产成人一区二区三区| 久久久国产精品麻豆| 色先锋aa成人| 久久不见久久见中文字幕免费| 日本一区二区高清| 欧美理论在线播放| 国产高清不卡一区二区| 亚洲一区二区三区视频在线播放 | 国产成人综合网| 一区二区三区日韩精品| 日韩欧美色电影| 91麻豆精品在线观看| 日本女人一区二区三区| 国产亚洲精久久久久久| 欧美男人的天堂一二区| 大白屁股一区二区视频| 午夜视频一区二区三区| 国产色产综合产在线视频| 欧美日韩精品欧美日韩精品一综合| 国产在线乱码一区二区三区| 亚洲午夜久久久久| www国产精品av| 精品视频在线看| 丁香婷婷综合网| 日韩va欧美va亚洲va久久| 中文字幕视频一区二区三区久| 欧美r级在线观看| 在线观看网站黄不卡| 国产精品一区免费在线观看| 亚洲国产精品久久久久秋霞影院| 亚洲国产精品高清| 欧美成人在线直播| 欧美性色aⅴ视频一区日韩精品| 国产mv日韩mv欧美| 欧美aaaaaa午夜精品| 一区二区三区高清不卡| 国产精品电影一区二区| 久久精品一区二区三区av | 日韩欧美在线123| 在线观看中文字幕不卡| 成人深夜在线观看| 国产精品一区二区果冻传媒| 日本不卡在线视频| 亚洲高清免费一级二级三级| 亚洲三级小视频| 国产精品久久久久久久久晋中| 日韩精品专区在线影院观看| 欧美群妇大交群的观看方式| 欧洲色大大久久| 91精彩视频在线| 色综合色狠狠天天综合色| 国产999精品久久久久久| 国产一区二区在线影院| 国产又黄又大久久| 国产二区国产一区在线观看| 国产精品一卡二| 国产精品影视在线观看| 国精产品一区一区三区mba桃花| 久久99日本精品| 国产美女久久久久| 国产99久久久国产精品潘金网站| 国产丶欧美丶日本不卡视频| 国产精品一线二线三线精华| 岛国一区二区三区| 成人高清免费观看| 一本久久精品一区二区| 欧美在线视频不卡| 欧美一区二区三区不卡| 欧美电影免费观看完整版| 91精品国产一区二区三区蜜臀| 欧美成人精品3d动漫h| 亚洲精品一区在线观看| 国产精品网站一区| 亚洲色图在线播放| 五月婷婷综合网| 奇米精品一区二区三区在线观看 | 欧美成人猛片aaaaaaa| 精品sm捆绑视频| 国产精品狼人久久影院观看方式| 亚洲女人小视频在线观看| 亚洲男人的天堂在线aⅴ视频| 午夜一区二区三区在线观看| 蜜臀av性久久久久av蜜臀妖精| 国产一区二区不卡在线| 99国产精品久久| 制服丝袜成人动漫| 国产欧美一区二区三区网站| 日韩美女精品在线| 奇米精品一区二区三区在线观看| 国产精品亚洲第一区在线暖暖韩国 | 久久精品人人做人人爽97| 中文字幕在线观看不卡视频| 亚洲chinese男男1069| 国产在线观看免费一区| 91在线码无精品| 日韩一区二区麻豆国产| 亚洲三级免费观看| 久草在线在线精品观看| 色综合欧美在线视频区| www久久精品| 成人av网站在线| 正在播放亚洲一区| 亚洲图片另类小说| 精品影视av免费| 欧美亚洲精品一区| 国产精品视频yy9299一区| 无码av中文一区二区三区桃花岛| 国产成人午夜高潮毛片| 欧美日韩免费在线视频| 一区在线观看视频| 国产又粗又猛又爽又黄91精品| 欧美视频一区二区| 中文字幕在线不卡一区二区三区| 久久99国产精品尤物| 欧美性生活影院| 亚洲欧美一区二区三区久本道91| 久久99精品一区二区三区三区| 精品1区2区3区| 国产精品久久久久精k8| 久久不见久久见免费视频7| 欧美久久久影院| 一区二区三区鲁丝不卡| 成人黄色电影在线 | 国产精品久久二区二区| 国产综合色精品一区二区三区| 欧美福利一区二区| 亚洲一区二区三区三| 色婷婷国产精品综合在线观看| 国产女主播一区| 国产一区二区久久| 欧美精品一区二区在线观看| 日本欧美一区二区在线观看| 色婷婷av一区二区三区gif| 欧美经典一区二区| 国产成人在线观看免费网站| 欧美成人一区二区三区片免费| 免费欧美日韩国产三级电影| 欧美色欧美亚洲另类二区| 一区二区三区 在线观看视频| 99久久精品免费看国产免费软件| 欧美韩日一区二区三区| 精品久久久久99| 久久精品国产999大香线蕉| 日韩三级视频中文字幕| 日本欧美一区二区三区乱码| 5月丁香婷婷综合| 伦理电影国产精品| 欧美成人性福生活免费看| 九九精品视频在线看| 亚洲精品在线观| 丰满放荡岳乱妇91ww| 亚洲欧洲另类国产综合| 色哟哟欧美精品| 天天操天天综合网| 欧美一级精品在线| 国产黄色成人av| 国产精品久久久久久久久晋中| 99久久免费视频.com| 亚洲猫色日本管| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 91丝袜美腿高跟国产极品老师 | 99久久精品情趣| 亚洲综合激情网| 欧美一三区三区四区免费在线看 | 综合婷婷亚洲小说| 欧美四级电影网| 老汉av免费一区二区三区 | 91国产精品成人| 日本aⅴ免费视频一区二区三区| 日韩精品一区二区三区视频播放| 精品一二线国产| 中文字幕亚洲精品在线观看| 欧美曰成人黄网| 久久99日本精品| 1024成人网| 日韩欧美国产一区二区在线播放 |