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

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

?? sha-1.c

?? 支持SHA算法
?? C
字號:
/* sha1sum.c - print SHA-1 Message-Digest Algorithm 
 * Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 * Copyright (C) 2004 g10 Code GmbH
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2, or (at your option) any
 * later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

/* SHA-1 coden take from gnupg 1.3.92. 

   Note, that this is a simple tool to be used for MS Windows.
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <errno.h>

#undef BIG_ENDIAN_HOST
typedef unsigned int u32;

/****************
 * Rotate a 32 bit integer by n bytes
 ****************/
#if defined(__GNUC__) && defined(__i386__)
static inline u32 rol( u32 x, int n)
{
	__asm__("roll %%cl,%0"
            :"=r" (x)
            :"0" (x),"c" (n));
	return x;
}
#else
#define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) )
#endif


typedef struct {
    u32  h0,h1,h2,h3,h4;
    u32  nblocks;
    unsigned char buf[64];
    int  count;
} SHA1_CONTEXT;



void sha1_init( SHA1_CONTEXT *hd )
{
    hd->h0 = 0x67452301;
    hd->h1 = 0xefcdab89;
    hd->h2 = 0x98badcfe;
    hd->h3 = 0x10325476;
    hd->h4 = 0xc3d2e1f0;
    hd->nblocks = 0;
    hd->count = 0;
}


/*
 * Transform the message X which consists of 16 32-bit-words
 */
static void
transform( SHA1_CONTEXT *hd, unsigned char *data )
{
    u32 a,b,c,d,e,tm;
    u32 x[16];

    /* get values from the chaining vars */
    a = hd->h0;
    b = hd->h1;
    c = hd->h2;
    d = hd->h3;
    e = hd->h4;

#ifdef BIG_ENDIAN_HOST
    memcpy( x, data, 64 );
#else
    { int i;
        unsigned char *p2;
        for(i=0, p2=(unsigned char*)x; i < 16; i++, p2 += 4 ) {
            p2[3] = *data++;
            p2[2] = *data++;
            p2[1] = *data++;
            p2[0] = *data++;
        }
    }
#endif


#define K1  0x5A827999L
#define K2  0x6ED9EBA1L
#define K3  0x8F1BBCDCL
#define K4  0xCA62C1D6L
#define F1(x,y,z)   ( z ^ ( x & ( y ^ z ) ) )
#define F2(x,y,z)   ( x ^ y ^ z )
#define F3(x,y,z)   ( ( x & y ) | ( z & ( x | y ) ) )
#define F4(x,y,z)   ( x ^ y ^ z )


#define M(i) ( tm =   x[i&0x0f] ^ x[(i-14)&0x0f]    \
               ^ x[(i-8)&0x0f] ^ x[(i-3)&0x0f]      \
               , (x[i&0x0f] = rol(tm,1)) )

#define R(a,b,c,d,e,f,k,m)  do { e += rol( a, 5 )   \
            + f( b, c, d )                          \
            + k                                     \
            + m;                                    \
        b = rol( b, 30 );                           \
    } while(0)
    R( a, b, c, d, e, F1, K1, x[ 0] );
    R( e, a, b, c, d, F1, K1, x[ 1] );
    R( d, e, a, b, c, F1, K1, x[ 2] );
    R( c, d, e, a, b, F1, K1, x[ 3] );
    R( b, c, d, e, a, F1, K1, x[ 4] );
    R( a, b, c, d, e, F1, K1, x[ 5] );
    R( e, a, b, c, d, F1, K1, x[ 6] );
    R( d, e, a, b, c, F1, K1, x[ 7] );
    R( c, d, e, a, b, F1, K1, x[ 8] );
    R( b, c, d, e, a, F1, K1, x[ 9] );
    R( a, b, c, d, e, F1, K1, x[10] );
    R( e, a, b, c, d, F1, K1, x[11] );
    R( d, e, a, b, c, F1, K1, x[12] );
    R( c, d, e, a, b, F1, K1, x[13] );
    R( b, c, d, e, a, F1, K1, x[14] );
    R( a, b, c, d, e, F1, K1, x[15] );
    R( e, a, b, c, d, F1, K1, M(16) );
    R( d, e, a, b, c, F1, K1, M(17) );
    R( c, d, e, a, b, F1, K1, M(18) );
    R( b, c, d, e, a, F1, K1, M(19) );
    R( a, b, c, d, e, F2, K2, M(20) );
    R( e, a, b, c, d, F2, K2, M(21) );
    R( d, e, a, b, c, F2, K2, M(22) );
    R( c, d, e, a, b, F2, K2, M(23) );
    R( b, c, d, e, a, F2, K2, M(24) );
    R( a, b, c, d, e, F2, K2, M(25) );
    R( e, a, b, c, d, F2, K2, M(26) );
    R( d, e, a, b, c, F2, K2, M(27) );
    R( c, d, e, a, b, F2, K2, M(28) );
    R( b, c, d, e, a, F2, K2, M(29) );
    R( a, b, c, d, e, F2, K2, M(30) );
    R( e, a, b, c, d, F2, K2, M(31) );
    R( d, e, a, b, c, F2, K2, M(32) );
    R( c, d, e, a, b, F2, K2, M(33) );
    R( b, c, d, e, a, F2, K2, M(34) );
    R( a, b, c, d, e, F2, K2, M(35) );
    R( e, a, b, c, d, F2, K2, M(36) );
    R( d, e, a, b, c, F2, K2, M(37) );
    R( c, d, e, a, b, F2, K2, M(38) );
    R( b, c, d, e, a, F2, K2, M(39) );
    R( a, b, c, d, e, F3, K3, M(40) );
    R( e, a, b, c, d, F3, K3, M(41) );
    R( d, e, a, b, c, F3, K3, M(42) );
    R( c, d, e, a, b, F3, K3, M(43) );
    R( b, c, d, e, a, F3, K3, M(44) );
    R( a, b, c, d, e, F3, K3, M(45) );
    R( e, a, b, c, d, F3, K3, M(46) );
    R( d, e, a, b, c, F3, K3, M(47) );
    R( c, d, e, a, b, F3, K3, M(48) );
    R( b, c, d, e, a, F3, K3, M(49) );
    R( a, b, c, d, e, F3, K3, M(50) );
    R( e, a, b, c, d, F3, K3, M(51) );
    R( d, e, a, b, c, F3, K3, M(52) );
    R( c, d, e, a, b, F3, K3, M(53) );
    R( b, c, d, e, a, F3, K3, M(54) );
    R( a, b, c, d, e, F3, K3, M(55) );
    R( e, a, b, c, d, F3, K3, M(56) );
    R( d, e, a, b, c, F3, K3, M(57) );
    R( c, d, e, a, b, F3, K3, M(58) );
    R( b, c, d, e, a, F3, K3, M(59) );
    R( a, b, c, d, e, F4, K4, M(60) );
    R( e, a, b, c, d, F4, K4, M(61) );
    R( d, e, a, b, c, F4, K4, M(62) );
    R( c, d, e, a, b, F4, K4, M(63) );
    R( b, c, d, e, a, F4, K4, M(64) );
    R( a, b, c, d, e, F4, K4, M(65) );
    R( e, a, b, c, d, F4, K4, M(66) );
    R( d, e, a, b, c, F4, K4, M(67) );
    R( c, d, e, a, b, F4, K4, M(68) );
    R( b, c, d, e, a, F4, K4, M(69) );
    R( a, b, c, d, e, F4, K4, M(70) );
    R( e, a, b, c, d, F4, K4, M(71) );
    R( d, e, a, b, c, F4, K4, M(72) );
    R( c, d, e, a, b, F4, K4, M(73) );
    R( b, c, d, e, a, F4, K4, M(74) );
    R( a, b, c, d, e, F4, K4, M(75) );
    R( e, a, b, c, d, F4, K4, M(76) );
    R( d, e, a, b, c, F4, K4, M(77) );
    R( c, d, e, a, b, F4, K4, M(78) );
    R( b, c, d, e, a, F4, K4, M(79) );

    /* Update chaining vars */
    hd->h0 += a;
    hd->h1 += b;
    hd->h2 += c;
    hd->h3 += d;
    hd->h4 += e;
}


/* Update the message digest with the contents
 * of INBUF with length INLEN.
 */
static void sha1_write( SHA1_CONTEXT *hd, unsigned char *inbuf, size_t inlen)
{
    if( hd->count == 64 ) { /* flush the buffer */
        transform( hd, hd->buf );
        hd->count = 0;
        hd->nblocks++;
    }
    if( !inbuf )
        return;
    if( hd->count ) {
        for( ; inlen && hd->count < 64; inlen-- )
            hd->buf[hd->count++] = *inbuf++;
        sha1_write( hd, NULL, 0 );
        if( !inlen )
            return;
    }

    while( inlen >= 64 ) {
        transform( hd, inbuf );
        hd->count = 0;
        hd->nblocks++;
        inlen -= 64;
        inbuf += 64;
    }
    for( ; inlen && hd->count < 64; inlen-- )
        hd->buf[hd->count++] = *inbuf++;
}


/* The routine final terminates the computation and
 * returns the digest.
 * The handle is prepared for a new cycle, but adding bytes to the
 * handle will the destroy the returned buffer.
 * Returns: 20 bytes representing the digest.
 */

static void sha1_final(SHA1_CONTEXT *hd)
{
    u32 t, msb, lsb;
    unsigned char *p;

    sha1_write(hd, NULL, 0); /* flush */;

    t = hd->nblocks;
    /* multiply by 64 to make a byte count */
    lsb = t << 6;
    msb = t >> 26;
    /* add the count */
    t = lsb;
    if( (lsb += hd->count) < t )
        msb++;
    /* multiply by 8 to make a bit count */
    t = lsb;
    lsb <<= 3;
    msb <<= 3;
    msb |= t >> 29;

    if( hd->count < 56 ) { /* enough room */
        hd->buf[hd->count++] = 0x80; /* pad */
        while( hd->count < 56 )
            hd->buf[hd->count++] = 0;  /* pad */
    }
    else { /* need one extra block */
        hd->buf[hd->count++] = 0x80; /* pad character */
        while( hd->count < 64 )
            hd->buf[hd->count++] = 0;
        sha1_write(hd, NULL, 0);  /* flush */;
        memset(hd->buf, 0, 56 ); /* fill next block with zeroes */
    }
    /* append the 64 bit count */
    hd->buf[56] = msb >> 24;
    hd->buf[57] = msb >> 16;
    hd->buf[58] = msb >>  8;
    hd->buf[59] = msb	   ;
    hd->buf[60] = lsb >> 24;
    hd->buf[61] = lsb >> 16;
    hd->buf[62] = lsb >>  8;
    hd->buf[63] = lsb	   ;
    transform( hd, hd->buf );

    p = hd->buf;
#ifdef BIG_ENDIAN_HOST
#define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
#else /* little endian */
#define X(a) do { *p++ = hd->h##a >> 24; *p++ = hd->h##a >> 16; \
        *p++ = hd->h##a >> 8; *p++ = hd->h##a; } while(0)
#endif
    X(0);
    X(1);
    X(2);
    X(3);
    X(4);
#undef X
}




int main (int argc, char **argv)
{
    assert (sizeof (u32) == 4);

    if (argc < 2)
    {
        fprintf (stderr, "usage: sha1sum filenames\n");
        exit (1);
    }
    for (argc--, argv++; argc; argv++, argc--)
    {
        FILE *fp;
        char buffer[4096];
        size_t n;
        SHA1_CONTEXT ctx;
        int i;
      
        fp = fopen (*argv, "rb");
        if (!fp)
        {
            fprintf (stderr, "can't open `%s': %s\n", *argv, strerror (errno));
            exit (1);
        }
        sha1_init (&ctx);
        while ( (n = fread (buffer, 1, sizeof buffer, fp)))
            sha1_write (&ctx, buffer, n);
        if (ferror (fp))
        {
            fprintf (stderr, "error reading `%s': %s\n", *argv,strerror (errno));
            exit (1);
        }
        sha1_final (&ctx);
        fclose (fp);
      
        for (i=0; i < 20; i++)
            printf ("%02x", ctx.buf[i]);
        printf ("  %s\n", *argv);
    }
    return 0;
}

/*
Local Variables:
compile-command: "cc -Wall -g -o sha1sum sha1sum.c"
End:
*/


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美老人xxxx18| 亚洲18影院在线观看| 大胆亚洲人体视频| 欧美激情在线看| 91亚洲男人天堂| 亚洲一区成人在线| 666欧美在线视频| 久久成人av少妇免费| 精品国产乱码久久久久久夜甘婷婷| 日韩成人精品在线| 精品日韩一区二区三区免费视频| 日本视频中文字幕一区二区三区| 欧美成人精品福利| 成人精品视频一区| 亚洲一区二区成人在线观看| 欧美老肥妇做.爰bbww| 极品瑜伽女神91| 亚洲免费资源在线播放| 4438x成人网最大色成网站| 国产精品一区二区黑丝| 伊人性伊人情综合网| 欧美一区永久视频免费观看| 国产高清精品久久久久| 一区二区三区在线播| 久久久久久麻豆| 欧美日韩中文精品| 国产成人久久精品77777最新版本| 亚洲精品欧美在线| 久久久欧美精品sm网站| 欧美无乱码久久久免费午夜一区| 久久精品999| 日韩精彩视频在线观看| 国产精品三级视频| 精品国产一区二区三区av性色| 99免费精品在线| 国内精品视频666| 美女mm1313爽爽久久久蜜臀| 亚洲精品成人在线| 中文字幕亚洲综合久久菠萝蜜| 欧美一区二区三区喷汁尤物| 一本到不卡精品视频在线观看| 国产精品乡下勾搭老头1| 久草精品在线观看| 天天色天天操综合| 天堂一区二区在线| 精品国产一区二区在线观看| 日韩一区二区在线观看| 欧美tickle裸体挠脚心vk| 911国产精品| 日韩美女一区二区三区| 日韩亚洲欧美综合| 欧美精品一区二区高清在线观看 | 午夜一区二区三区视频| 亚洲妇熟xx妇色黄| 蜜臀av性久久久久蜜臀aⅴ四虎| 午夜精品福利一区二区三区av| 视频一区视频二区中文| 热久久国产精品| 国产美女精品在线| 成人免费三级在线| 在线视频国内自拍亚洲视频| 欧美日韩一卡二卡三卡| 日韩一区二区在线看| 日本一区二区久久| 亚洲一区二区精品3399| 久久成人18免费观看| 成人性生交大合| 欧美性xxxxxx少妇| 26uuu另类欧美| 中文字幕一区二区三区精华液| 亚洲一区二区三区在线播放 | 欧美激情一区二区三区四区| 亚洲精品高清在线| 高清成人免费视频| 欧美色图片你懂的| 亚洲国产成人自拍| 麻豆精品一二三| 欧美午夜不卡视频| 国产精品嫩草久久久久| 免费人成精品欧美精品| 在线观看一区日韩| 国产女人水真多18毛片18精品视频| 亚洲一区二区三区影院| 丁香五精品蜜臀久久久久99网站| 欧美日韩电影在线播放| 综合色天天鬼久久鬼色| 国产伦精品一区二区三区免费迷| 欧美日韩国产首页| 亚洲人亚洲人成电影网站色| 国产乱码精品一区二区三区忘忧草 | 日本美女一区二区三区视频| 欧美性xxxxxxxx| 国产精品女主播在线观看| 看国产成人h片视频| 欧美电影一区二区| 尤物av一区二区| 色噜噜狠狠成人网p站| 一区二区在线观看视频在线观看| 波波电影院一区二区三区| 中文幕一区二区三区久久蜜桃| 国产露脸91国语对白| 国产偷国产偷精品高清尤物 | 蜜臀精品一区二区三区在线观看| 欧美主播一区二区三区美女| 一卡二卡欧美日韩| 91精品国产手机| 国产美女在线精品| 成人免费在线视频| 欧美三级欧美一级| 国产一区二区精品久久91| 国产精品二区一区二区aⅴ污介绍| 成人午夜精品在线| 亚洲一区二区三区自拍| 欧美一级生活片| 国产不卡视频在线观看| 中文字幕中文字幕一区| 欧美日韩精品一区二区三区| 精品一区二区三区免费观看| 国产精品免费看片| 日韩区在线观看| 色94色欧美sute亚洲线路一久| 麻豆精品视频在线观看视频| 亚洲欧洲国产日韩| 国产天堂亚洲国产碰碰| 欧美日韩久久一区二区| 成人免费视频app| 韩国在线一区二区| 性感美女极品91精品| 成人免费在线观看入口| 日本一区二区免费在线观看视频 | 99精品一区二区三区| 久久99国产精品久久| 日本中文字幕一区| 亚洲一二三四区不卡| 国产精品久久久一区麻豆最新章节| 欧美成人video| 欧美一区二区三区播放老司机 | 国产美女主播视频一区| 久久99精品一区二区三区三区| 午夜电影网一区| 一区二区三区不卡在线观看| 国产精品久久毛片a| 国产精品伦理在线| 欧美韩日一区二区三区| 精品国产a毛片| 欧美一卡2卡3卡4卡| 日韩视频免费观看高清完整版在线观看 | 国产69精品久久99不卡| 国产精品99久久久| 99久久精品国产导航| 色综合久久99| 欧美日韩国产在线播放网站| 欧美年轻男男videosbes| 4438亚洲最大| 国产精品色噜噜| 亚洲一级在线观看| 日韩电影在线一区| 国产麻豆欧美日韩一区| 成人动漫一区二区| 色综合久久88色综合天天| 欧美日韩午夜影院| 欧美成人精品3d动漫h| 中文字幕日韩av资源站| 亚洲成av人综合在线观看| 国产一二精品视频| 日本道色综合久久| 久久久无码精品亚洲日韩按摩| 自拍偷拍国产亚洲| 久久99日本精品| 色综合久久久网| 亚洲精品一区在线观看| 亚洲视频免费在线| 老司机精品视频线观看86| 97久久久精品综合88久久| 在线视频欧美区| 欧美一区二区成人| 日韩一区日韩二区| 黄一区二区三区| 日韩欧美亚洲国产另类| 中文字幕在线观看一区| 美国av一区二区| 欧美日韩激情一区二区三区| 中文字幕精品三区| 狠狠色2019综合网| 欧美人成免费网站| 亚洲国产美国国产综合一区二区| 国产精品一级片在线观看| 91麻豆精品国产91久久久久久| 国产视频视频一区| 国产精品中文字幕日韩精品| 欧美一区二区日韩| 午夜精品视频在线观看| 国产成人av影院| 亚洲国产激情av| 国产suv精品一区二区883| 欧美高清在线一区二区| 处破女av一区二区| 亚洲欧美激情小说另类| 91在线国产福利| 亚洲综合免费观看高清完整版|