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

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

?? sha1.cpp

?? A console-based hah calculators
?? CPP
字號:
/*
 ---------------------------------------------------------------------------
 Copyright (c) 2002, Dr Brian Gladman <brg@gladman.me.uk>, Worcester, UK.
 All rights reserved.

 LICENSE TERMS

 The free distribution and use of this software in both source and binary 
 form is allowed (with or without changes) provided that:

   1. distributions of this source code include the above copyright 
      notice, this list of conditions and the following disclaimer;

   2. distributions in binary form include the above copyright
      notice, this list of conditions and the following disclaimer
      in the documentation and/or other associated materials;

   3. the copyright holder's name is not used to endorse products 
      built using this software without specific written permission. 

 ALTERNATIVELY, provided that this notice is retained in full, this product
 may be distributed under the terms of the GNU General Public License (GPL),
 in which case the provisions of the GPL apply INSTEAD OF those given above.
 
 DISCLAIMER

 This software is provided 'as is' with no explicit or implied warranties
 in respect of its properties, including, but not limited to, correctness 
 and/or fitness for purpose.
 ---------------------------------------------------------------------------
 Issue Date: 30/11/2002

 This is a byte oriented version of SHA1 that operates on arrays of bytes
 stored in memory. It runs at 22 cycles per byte on a Pentium P4 processor
*/

#include <string.h>     /* for memcpy() etc.        */
#include <stdlib.h>     /* for _lrotl with VC++     */

#if defined(__GNUC__) || defined(__GNU_LIBRARY__)
#include <byteswap.h>
#include <endian.h>
#endif

#include "sha1.h"

/*
    To obtain the highest speed on processors with 32-bit words, this code 
    needs to determine the order in which bytes are packed into such words.
    The following block of code is an attempt to capture the most obvious 
    ways in which various environemnts specify their endian definitions. 
    It may well fail, in which case the definitions will need to be set by 
    editing at the points marked **** EDIT HERE IF NECESSARY **** below.
*/
#define SHA_LITTLE_ENDIAN   1234 /* byte 0 is least significant (i386) */
#define SHA_BIG_ENDIAN      4321 /* byte 0 is most significant (mc68k) */

#if !defined(PLATFORM_BYTE_ORDER)
#if defined(LITTLE_ENDIAN) || defined(BIG_ENDIAN)
#  if defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN)
#    if defined(BYTE_ORDER)
#      if   (BYTE_ORDER == LITTLE_ENDIAN)
#        define PLATFORM_BYTE_ORDER SHA_LITTLE_ENDIAN
#      elif (BYTE_ORDER == BIG_ENDIAN)
#        define PLATFORM_BYTE_ORDER SHA_BIG_ENDIAN
#      endif
#    endif
#  elif defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN) 
#    define PLATFORM_BYTE_ORDER SHA_LITTLE_ENDIAN
#  elif !defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN)
#    define PLATFORM_BYTE_ORDER SHA_BIG_ENDIAN
#  endif
#elif defined(_LITTLE_ENDIAN) || defined(_BIG_ENDIAN)
#  if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN)
#    if defined(_BYTE_ORDER)
#      if   (_BYTE_ORDER == _LITTLE_ENDIAN)
#        define PLATFORM_BYTE_ORDER SHA_LITTLE_ENDIAN
#      elif (_BYTE_ORDER == _BIG_ENDIAN)
#        define PLATFORM_BYTE_ORDER SHA_BIG_ENDIAN
#      endif
#    endif
#  elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) 
#    define PLATFORM_BYTE_ORDER SHA_LITTLE_ENDIAN
#  elif !defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN)
#    define PLATFORM_BYTE_ORDER SHA_BIG_ENDIAN
#  endif
#elif 0     /* **** EDIT HERE IF NECESSARY **** */
#define PLATFORM_BYTE_ORDER SHA_LITTLE_ENDIAN
#elif 0     /* **** EDIT HERE IF NECESSARY **** */
#define PLATFORM_BYTE_ORDER SHA_BIG_ENDIAN
#elif (('1234' >> 24) == '1')
#  define PLATFORM_BYTE_ORDER SHA_LITTLE_ENDIAN
#elif (('4321' >> 24) == '1')
#  define PLATFORM_BYTE_ORDER SHA_BIG_ENDIAN
#endif
#endif

#if !defined(PLATFORM_BYTE_ORDER)
#  error Please set undetermined byte order (lines 87 or 89 of sha1.c).
#endif

#define rotl32(x,n) (((x) << n) | ((x) >> (32 - n)))

#if (PLATFORM_BYTE_ORDER == SHA_BIG_ENDIAN)
#define swap_b32(x) (x)
#elif defined(bswap_32)
#define swap_b32(x) bswap_32(x)
#else
#define swap_b32(x) ((rotl32((x), 8) & 0x00ff00ff) | (rotl32((x), 24) & 0xff00ff00))
#endif

#define SHA1_MASK   (SHA1_BLOCK_SIZE - 1)

/* reverse byte order in 32-bit words   */

#define ch(x,y,z)       (((x) & (y)) ^ (~(x) & (z)))
#define parity(x,y,z)   ((x) ^ (y) ^ (z))
#define maj(x,y,z)      (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))

/* A normal version as set out in the FIPS. This version uses   */
/* partial loop unrolling and is optimised for the Pentium 4    */

#define rnd(f,k)    \
    t = a; a = rotl32(a,5) + f(b,c,d) + e + k + w[i]; \
    e = d; d = c; c = rotl32(b, 30); b = t

void sha1_compile(sha1_ctx ctx[1])
{   sha1_32t    w[80], i, a, b, c, d, e, t;

    /* note that words are compiled from the buffer into 32-bit */
    /* words in big-endian order so an order reversal is needed */
    /* here on little endian machines                           */
    for(i = 0; i < SHA1_BLOCK_SIZE / 4; ++i)
        w[i] = swap_b32(ctx->wbuf[i]);

    for(i = SHA1_BLOCK_SIZE / 4; i < 80; ++i)
        w[i] = rotl32(w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16], 1);

    a = ctx->hash[0];
    b = ctx->hash[1];
    c = ctx->hash[2];
    d = ctx->hash[3];
    e = ctx->hash[4];

    for(i = 0; i < 20; ++i)
    {
        rnd(ch, 0x5a827999);    
    }

    for(i = 20; i < 40; ++i)
    {
        rnd(parity, 0x6ed9eba1);
    }

    for(i = 40; i < 60; ++i)
    {
        rnd(maj, 0x8f1bbcdc);
    }

    for(i = 60; i < 80; ++i)
    {
        rnd(parity, 0xca62c1d6);
    }

    ctx->hash[0] += a; 
    ctx->hash[1] += b; 
    ctx->hash[2] += c; 
    ctx->hash[3] += d; 
    ctx->hash[4] += e;
}

void sha1_begin(sha1_ctx ctx[1])
{
    ctx->count[0] = ctx->count[1] = 0;
    ctx->hash[0] = 0x67452301;
    ctx->hash[1] = 0xefcdab89;
    ctx->hash[2] = 0x98badcfe;
    ctx->hash[3] = 0x10325476;
    ctx->hash[4] = 0xc3d2e1f0;
}

/* SHA1 hash data in an array of bytes into hash buffer and call the        */
/* hash_compile function as required.                                       */

void sha1_hash(const unsigned char data[], unsigned int len, sha1_ctx ctx[1])
{   sha1_32t pos = (sha1_32t)(ctx->count[0] & SHA1_MASK), 
             space = SHA1_BLOCK_SIZE - pos;
    const unsigned char *sp = data;

    if((ctx->count[0] += len) < len)
        ++(ctx->count[1]);

    while(len >= space)     /* tranfer whole blocks while possible  */
    {
        memcpy(((unsigned char*)ctx->wbuf) + pos, sp, space);
        sp += space; len -= space; space = SHA1_BLOCK_SIZE; pos = 0; 
        sha1_compile(ctx);
    }

    memcpy(((unsigned char*)ctx->wbuf) + pos, sp, len);
}

/* SHA1 final padding and digest calculation  */

#if (PLATFORM_BYTE_ORDER == SHA_LITTLE_ENDIAN)
static sha1_32t  mask[4] = 
	{   0x00000000, 0x000000ff, 0x0000ffff, 0x00ffffff };
static sha1_32t  bits[4] = 
	{   0x00000080, 0x00008000, 0x00800000, 0x80000000 };
#else
static sha1_32t  mask[4] = 
	{   0x00000000, 0xff000000, 0xffff0000, 0xffffff00 };
static sha1_32t  bits[4] = 
	{   0x80000000, 0x00800000, 0x00008000, 0x00000080 };
#endif

void sha1_end(unsigned char hval[], sha1_ctx ctx[1])
{   sha1_32t    i = (sha1_32t)(ctx->count[0] & SHA1_MASK);

    /* mask out the rest of any partial 32-bit word and then set    */
    /* the next byte to 0x80. On big-endian machines any bytes in   */
    /* the buffer will be at the top end of 32 bit words, on little */
    /* endian machines they will be at the bottom. Hence the AND    */
    /* and OR masks above are reversed for little endian systems    */
	/* Note that we can always add the first padding byte at this	*/
	/* because the buffer always contains at least one empty slot	*/ 
    ctx->wbuf[i >> 2] = (ctx->wbuf[i >> 2] & mask[i & 3]) | bits[i & 3];

    /* we need 9 or more empty positions, one for the padding byte  */
    /* (above) and eight for the length count.  If there is not     */
    /* enough space pad and empty the buffer                        */
    if(i > SHA1_BLOCK_SIZE - 9)
    {
        if(i < 60) ctx->wbuf[15] = 0;
        sha1_compile(ctx);
        i = 0;
    }
    else    /* compute a word index for the empty buffer positions  */
        i = (i >> 2) + 1;

    while(i < 14) /* and zero pad all but last two positions      */ 
        ctx->wbuf[i++] = 0;
    
    /* assemble the eight byte counter in in big-endian format		*/
    ctx->wbuf[14] = swap_b32((ctx->count[1] << 3) | (ctx->count[0] >> 29));
    ctx->wbuf[15] = swap_b32(ctx->count[0] << 3);

    sha1_compile(ctx);

    /* extract the hash value as bytes in case the hash buffer is   */
    /* misaligned for 32-bit words                                  */
    for(i = 0; i < SHA1_DIGEST_SIZE; ++i)
        hval[i] = (unsigned char)(ctx->hash[i >> 2] >> 8 * (~i & 3));
}

void sha1(unsigned char hval[], const unsigned char data[], unsigned int len)
{   sha1_ctx    cx[1];

    sha1_begin(cx); sha1_hash(data, len, cx); sha1_end(hval, cx);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲色图制服诱惑 | 一本大道av一区二区在线播放 | 欧美年轻男男videosbes| 久久精品人人做人人综合| 久久精品国产一区二区| 欧美丰满美乳xxx高潮www| 亚洲国产一区二区视频| 欧美日韩综合在线| 天天av天天翘天天综合网| 日韩免费观看高清完整版| 久久成人精品无人区| 久久精品人人做人人爽97| av在线免费不卡| 亚洲成av人片在线观看无码| 日韩三级.com| 成人免费av网站| 亚洲mv在线观看| 久久综合久久综合亚洲| 成人黄色在线看| 亚洲午夜久久久久久久久久久 | 久久久综合视频| 色综合久久六月婷婷中文字幕| 亚洲h在线观看| 欧美国产一区二区| 欧美日韩一区二区在线视频| 麻豆专区一区二区三区四区五区| 久久久久国产精品免费免费搜索| 一本到高清视频免费精品| 美女mm1313爽爽久久久蜜臀| 亚洲国产高清在线观看视频| 91麻豆精品国产91久久久更新时间 | 91丨九色丨黑人外教| 激情图区综合网| 日韩精品午夜视频| 玉米视频成人免费看| 久久精品日产第一区二区三区高清版| 色偷偷久久人人79超碰人人澡| 另类中文字幕网| 五月开心婷婷久久| 亚洲综合色在线| 亚洲啪啪综合av一区二区三区| 久久久精品国产免费观看同学| 日韩欧美中文字幕一区| 在线91免费看| 在线播放亚洲一区| 在线观看av一区二区| 色狠狠综合天天综合综合| 91亚洲精品一区二区乱码| 国产1区2区3区精品美女| 国产精品夜夜嗨| 风间由美一区二区三区在线观看| 裸体在线国模精品偷拍| 老司机免费视频一区二区三区| 麻豆精品久久精品色综合| 韩国女主播成人在线| 国产一区二区三区免费看 | 日韩高清不卡在线| 美脚の诱脚舐め脚责91| 蜜臀久久99精品久久久画质超高清| 亚洲国产视频在线| 免费在线观看视频一区| 国产高清一区日本| 色综合久久88色综合天天免费| 在线看日本不卡| 欧美精品一区二区三区蜜臀| 国产精品福利一区| 蜜桃视频第一区免费观看| 国产高清不卡一区二区| 欧美亚洲尤物久久| 精品处破学生在线二十三| 日本一区二区综合亚洲| 香蕉久久一区二区不卡无毒影院| 国产老肥熟一区二区三区| 色婷婷av一区二区三区软件| 精品国产一区二区国模嫣然| 亚洲一区二区三区四区五区中文| 国产主播一区二区三区| 欧美日韩国产系列| 最近日韩中文字幕| 激情综合网激情| 欧美一级片免费看| 亚洲一区二区三区四区中文字幕| 国产成人免费在线观看| 亚洲精品在线观看网站| 亚洲永久精品大片| 97成人超碰视| 最新高清无码专区| 成人黄色在线网站| 日本一区二区久久| 国产一区在线看| 精品人伦一区二区色婷婷| 日韩电影在线一区| 欧美日本不卡视频| 亚洲国产视频一区二区| 91激情五月电影| 亚洲图片欧美一区| 欧美日韩日日夜夜| 三级影片在线观看欧美日韩一区二区| 欧美性猛交xxxx黑人交 | 日韩欧美综合一区| 久久精品99国产精品日本| 精品国产污网站| 成人动漫一区二区在线| 国产精品久久久久久户外露出| 97超碰欧美中文字幕| 亚洲综合色成人| 欧美日韩色综合| 国产精品一区二区91| 成人欧美一区二区三区在线播放| 高清日韩电视剧大全免费| 久久久久99精品国产片| 91美女福利视频| 理论片日本一区| 中文字幕亚洲区| 91麻豆精品国产| 色香色香欲天天天影视综合网| 性感美女极品91精品| 中文字幕欧美区| 欧美一级夜夜爽| 色欧美片视频在线观看在线视频| 免费日本视频一区| 国产精品麻豆一区二区 | 色综合色狠狠综合色| 蜜臀av亚洲一区中文字幕| 中文字幕乱码日本亚洲一区二区| 欧美日本一道本| 色狠狠一区二区| 国产成a人亚洲| 麻豆国产精品视频| 亚洲免费视频成人| 久久综合久久久久88| 欧美久久久一区| 91首页免费视频| av电影在线不卡| 国产69精品久久99不卡| 国产麻豆欧美日韩一区| 美腿丝袜一区二区三区| 亚洲成人久久影院| 亚洲国产视频一区二区| 一区二区三区中文字幕| 国产免费观看久久| 日本一区免费视频| 中文一区二区完整视频在线观看| 欧美大白屁股肥臀xxxxxx| 欧美一区二区三区电影| 欧美男人的天堂一二区| 欧美日本国产一区| 欧美日韩一级二级| 91精品国产91久久综合桃花| 91麻豆精品91久久久久同性| 欧美日韩卡一卡二| 91精品一区二区三区在线观看| 欧美日韩不卡一区| 欧美一卡2卡3卡4卡| 91精品国产黑色紧身裤美女| 精品国产乱码久久久久久浪潮| 2021国产精品久久精品| 国产亚洲人成网站| 日韩美女啊v在线免费观看| 亚洲图片自拍偷拍| 久久不见久久见免费视频7| 久久www免费人成看片高清| 国产91丝袜在线18| 在线精品观看国产| 91精品国产欧美一区二区成人| 久久久久久久一区| 亚洲一区二区三区视频在线| 久久精品国产在热久久| 99精品视频免费在线观看| 欧美剧情电影在线观看完整版免费励志电影 | 亚洲人快播电影网| 日韩精品一级二级 | 欧美另类变人与禽xxxxx| 国产情人综合久久777777| 中文字幕一区二区在线观看| 亚洲午夜激情av| 白白色 亚洲乱淫| 精品国精品国产尤物美女| 亚洲一区在线视频| 成人精品视频一区二区三区尤物| 日韩一区二区免费在线观看| 亚洲精品视频一区二区| 国产综合色视频| 日韩一卡二卡三卡国产欧美| 一区二区三区在线观看视频| 成人免费观看视频| 国产精品美女久久福利网站| 精品一区二区三区视频在线观看| 在线视频你懂得一区二区三区| 国产三级精品三级在线专区| 激情另类小说区图片区视频区| 欧美精选午夜久久久乱码6080| 一区二区三区毛片| 色综合久久久网| 一区二区免费看| 欧美性猛交一区二区三区精品| 一区二区三区精品在线| 在线亚洲免费视频| 亚洲一区二三区| 日韩亚洲欧美成人一区|