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

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

?? sha.cpp

?? 幾十種常用的加密算法庫 vc6 模塊封裝良好方便使用
?? CPP
字號:
// sha.cpp - modified by Wei Dai from Peter Gutmann's code
// Copyright 1992 by Peter Gutmann <pgut01@cs.auckland.ac.nz>.  Distributed with permission.

#include "pch.h"
#include "sha.h"

NAMESPACE_BEGIN(CryptoPP)

SHA::SHA()
	: IteratedHash<word32>(DATASIZE, DIGESTSIZE)
{
	Init();
}

void SHA::Init()
{
	countLo = countHi = 0;

	digest[0] = 0x67452301L;
	digest[1] = 0xEFCDAB89L;
	digest[2] = 0x98BADCFEL;
	digest[3] = 0x10325476L;
	digest[4] = 0xC3D2E1F0L;
}

void SHA::HashBlock(const word32 *input)
{
#ifndef IS_LITTLE_ENDIAN
	Transform(digest, input);
#else
	byteReverse(data.ptr, input, (unsigned int)DATASIZE);
	Transform(digest, data);
#endif
}

void SHA::Final(byte *hash)
{
	PadLastBlock(56);
	CorrectEndianess(data, data, 56);

	data[14] = countHi;
	data[15] = countLo;

	Transform(digest, data);
	CorrectEndianess(digest, digest, DIGESTSIZE);
	memcpy(hash, digest, DIGESTSIZE);

	Init();		// reinit for next use
}


/* The SHA f()-functions.  The f1 and f3 functions can be optimized to
   save one bool operation each - thanks to Rich Schroeppel,
   rcs@cs.arizona.edu for discovering this */

/*#define f1(x,y,z) ( ( x & y ) | ( ~x & z ) )          // Rounds  0-19 */
#define f1(x,y,z)   ( z ^ ( x & ( y ^ z ) ) )           /* Rounds  0-19 */
#define f2(x,y,z)   ( x ^ y ^ z )                       /* Rounds 20-39 */
/*#define f3(x,y,z) ( ( x & y ) | ( x & z ) | ( y & z ) )   // Rounds 40-59 */
#define f3(x,y,z)   ( ( x & y ) | ( z & ( x | y ) ) )   /* Rounds 40-59 */
#define f4(x,y,z)   ( x ^ y ^ z )                       /* Rounds 60-79 */

/* The SHA Mysterious Constants */

#define K1  0x5A827999L                                 /* Rounds  0-19 */
#define K2  0x6ED9EBA1L                                 /* Rounds 20-39 */
#define K3  0x8F1BBCDCL                                 /* Rounds 40-59 */
#define K4  0xCA62C1D6L                                 /* Rounds 60-79 */

/* Note that it may be necessary to add parentheses to these macros if they
   are to be called with expressions as arguments */

/* The initial expanding function.  The hash function is defined over an
   80-word expanded input array W, where the first 16 are copies of the input
   data, and the remaining 64 are defined by

		W[ i ] = W[ i - 16 ] ^ W[ i - 14 ] ^ W[ i - 8 ] ^ W[ i - 3 ]

   This implementation generates these values on the fly in a circular
   buffer - thanks to Colin Plumb, colin@nyx10.cs.du.edu for this
   optimization.

   The updated SHA-1 changes the expanding function by adding a rotate of 1
   bit. */

  #define expand(W,i) ( W[ i & 15 ] = rotl( (W[i&15] ^ W[i-14&15] ^ \
											 W[i-8&15] ^ W[i-3&15]), 1U) )

/* The prototype SHA sub-round.  The fundamental sub-round is:

		a' = e + ROTL( 5, a ) + f( b, c, d ) + k + data;
		b' = a;
		c' = ROTL( 30, b );
		d' = c;
		e' = d;

   but this is implemented by unrolling the loop 5 times and renaming the
   variables ( e, a, b, c, d ) = ( a', b', c', d', e' ) each iteration.
   This code is then replicated 20 times for each of the 4 functions, using
   the next 20 values from the W[] array each time */

#define subRound(a, b, c, d, e, f, k, data) \
	( e += rotl(a,5U) + f(b,c,d) + k + data, b = rotl(b,30U))

/* Perform the SHA transformation.  Note that this code, like MD5, seems to
   break some optimizing compilers due to the complexity of the expressions
   and the size of the basic block.  It may be necessary to split it into
   sections, e.g. based on the four subrounds */

void SHA::Transform( word32 *digest, const word32 *data )
{
	word32 eData[16];
	memcpy( eData, data, DATASIZE );

	register word32 A, B, C, D, E;
	A = digest[0];
	B = digest[1];
	C = digest[2];
	D = digest[3];
	E = digest[4];

	// Heavy mangling, in 4 sub-rounds of 20 interations each.
	subRound( A, B, C, D, E, f1, K1, eData[  0 ] );
	subRound( E, A, B, C, D, f1, K1, eData[  1 ] );
	subRound( D, E, A, B, C, f1, K1, eData[  2 ] );
	subRound( C, D, E, A, B, f1, K1, eData[  3 ] );
	subRound( B, C, D, E, A, f1, K1, eData[  4 ] );
	subRound( A, B, C, D, E, f1, K1, eData[  5 ] );
	subRound( E, A, B, C, D, f1, K1, eData[  6 ] );
	subRound( D, E, A, B, C, f1, K1, eData[  7 ] );
	subRound( C, D, E, A, B, f1, K1, eData[  8 ] );
	subRound( B, C, D, E, A, f1, K1, eData[  9 ] );
	subRound( A, B, C, D, E, f1, K1, eData[ 10 ] );
	subRound( E, A, B, C, D, f1, K1, eData[ 11 ] );
	subRound( D, E, A, B, C, f1, K1, eData[ 12 ] );
	subRound( C, D, E, A, B, f1, K1, eData[ 13 ] );
	subRound( B, C, D, E, A, f1, K1, eData[ 14 ] );
	subRound( A, B, C, D, E, f1, K1, eData[ 15 ] );
	subRound( E, A, B, C, D, f1, K1, expand( eData, 16 ) );
	subRound( D, E, A, B, C, f1, K1, expand( eData, 17 ) );
	subRound( C, D, E, A, B, f1, K1, expand( eData, 18 ) );
	subRound( B, C, D, E, A, f1, K1, expand( eData, 19 ) );

	subRound( A, B, C, D, E, f2, K2, expand( eData, 20 ) );
	subRound( E, A, B, C, D, f2, K2, expand( eData, 21 ) );
	subRound( D, E, A, B, C, f2, K2, expand( eData, 22 ) );
	subRound( C, D, E, A, B, f2, K2, expand( eData, 23 ) );
	subRound( B, C, D, E, A, f2, K2, expand( eData, 24 ) );
	subRound( A, B, C, D, E, f2, K2, expand( eData, 25 ) );
	subRound( E, A, B, C, D, f2, K2, expand( eData, 26 ) );
	subRound( D, E, A, B, C, f2, K2, expand( eData, 27 ) );
	subRound( C, D, E, A, B, f2, K2, expand( eData, 28 ) );
	subRound( B, C, D, E, A, f2, K2, expand( eData, 29 ) );
	subRound( A, B, C, D, E, f2, K2, expand( eData, 30 ) );
	subRound( E, A, B, C, D, f2, K2, expand( eData, 31 ) );
	subRound( D, E, A, B, C, f2, K2, expand( eData, 32 ) );
	subRound( C, D, E, A, B, f2, K2, expand( eData, 33 ) );
	subRound( B, C, D, E, A, f2, K2, expand( eData, 34 ) );
	subRound( A, B, C, D, E, f2, K2, expand( eData, 35 ) );
	subRound( E, A, B, C, D, f2, K2, expand( eData, 36 ) );
	subRound( D, E, A, B, C, f2, K2, expand( eData, 37 ) );
	subRound( C, D, E, A, B, f2, K2, expand( eData, 38 ) );
	subRound( B, C, D, E, A, f2, K2, expand( eData, 39 ) );

	subRound( A, B, C, D, E, f3, K3, expand( eData, 40 ) );
	subRound( E, A, B, C, D, f3, K3, expand( eData, 41 ) );
	subRound( D, E, A, B, C, f3, K3, expand( eData, 42 ) );
	subRound( C, D, E, A, B, f3, K3, expand( eData, 43 ) );
	subRound( B, C, D, E, A, f3, K3, expand( eData, 44 ) );
	subRound( A, B, C, D, E, f3, K3, expand( eData, 45 ) );
	subRound( E, A, B, C, D, f3, K3, expand( eData, 46 ) );
	subRound( D, E, A, B, C, f3, K3, expand( eData, 47 ) );
	subRound( C, D, E, A, B, f3, K3, expand( eData, 48 ) );
	subRound( B, C, D, E, A, f3, K3, expand( eData, 49 ) );
	subRound( A, B, C, D, E, f3, K3, expand( eData, 50 ) );
	subRound( E, A, B, C, D, f3, K3, expand( eData, 51 ) );
	subRound( D, E, A, B, C, f3, K3, expand( eData, 52 ) );
	subRound( C, D, E, A, B, f3, K3, expand( eData, 53 ) );
	subRound( B, C, D, E, A, f3, K3, expand( eData, 54 ) );
	subRound( A, B, C, D, E, f3, K3, expand( eData, 55 ) );
	subRound( E, A, B, C, D, f3, K3, expand( eData, 56 ) );
	subRound( D, E, A, B, C, f3, K3, expand( eData, 57 ) );
	subRound( C, D, E, A, B, f3, K3, expand( eData, 58 ) );
	subRound( B, C, D, E, A, f3, K3, expand( eData, 59 ) );

	subRound( A, B, C, D, E, f4, K4, expand( eData, 60 ) );
	subRound( E, A, B, C, D, f4, K4, expand( eData, 61 ) );
	subRound( D, E, A, B, C, f4, K4, expand( eData, 62 ) );
	subRound( C, D, E, A, B, f4, K4, expand( eData, 63 ) );
	subRound( B, C, D, E, A, f4, K4, expand( eData, 64 ) );
	subRound( A, B, C, D, E, f4, K4, expand( eData, 65 ) );
	subRound( E, A, B, C, D, f4, K4, expand( eData, 66 ) );
	subRound( D, E, A, B, C, f4, K4, expand( eData, 67 ) );
	subRound( C, D, E, A, B, f4, K4, expand( eData, 68 ) );
	subRound( B, C, D, E, A, f4, K4, expand( eData, 69 ) );
	subRound( A, B, C, D, E, f4, K4, expand( eData, 70 ) );
	subRound( E, A, B, C, D, f4, K4, expand( eData, 71 ) );
	subRound( D, E, A, B, C, f4, K4, expand( eData, 72 ) );
	subRound( C, D, E, A, B, f4, K4, expand( eData, 73 ) );
	subRound( B, C, D, E, A, f4, K4, expand( eData, 74 ) );
	subRound( A, B, C, D, E, f4, K4, expand( eData, 75 ) );
	subRound( E, A, B, C, D, f4, K4, expand( eData, 76 ) );
	subRound( D, E, A, B, C, f4, K4, expand( eData, 77 ) );
	subRound( C, D, E, A, B, f4, K4, expand( eData, 78 ) );
	subRound( B, C, D, E, A, f4, K4, expand( eData, 79 ) );

	digest[0] += A;
	digest[1] += B;
	digest[2] += C;
	digest[3] += D;
	digest[4] += E;

	memset(eData, 0, DATASIZE);
}

NAMESPACE_END

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产大片一区二区| 欧美精品自拍偷拍| 欧美福利电影网| 欧美高清在线一区二区| 婷婷综合五月天| av电影天堂一区二区在线观看| 在线播放一区二区三区| 亚洲欧洲国产专区| 国产99久久久久久免费看农村| 欧美色老头old∨ideo| 自拍偷在线精品自拍偷无码专区 | 韩国午夜理伦三级不卡影院| 91视频国产观看| 亚洲欧美激情插| 成人精品一区二区三区四区 | 欧美国产日韩亚洲一区| 久久99九九99精品| 91麻豆精品国产91久久久更新时间 | 欧美亚洲精品一区| 中文字幕亚洲欧美在线不卡| 国产精品1024| 久久久久久久一区| 国产精品一区一区| 久久久www成人免费毛片麻豆 | 91免费观看国产| 国产精品传媒在线| 99久久精品99国产精品| 国产精品第一页第二页第三页| 国产精品一区二区三区乱码| 久久久久久久精| 国产91在线|亚洲| 中文字幕精品综合| 成人h精品动漫一区二区三区| 国产欧美精品一区二区色综合朱莉| 九九**精品视频免费播放| 欧美草草影院在线视频| 韩国毛片一区二区三区| 精品国产网站在线观看| 国产成人av福利| 国产精品素人一区二区| av成人免费在线观看| 有码一区二区三区| 欧美日韩免费观看一区二区三区| 亚洲国产精品久久久男人的天堂| 欧美日韩国产系列| 美女免费视频一区| 国产欧美va欧美不卡在线 | 国产一区二区三区国产| 中文字幕乱码亚洲精品一区| 日韩精品一二三四| 久久久国产精品麻豆| 不卡在线观看av| 亚洲制服丝袜在线| 91精品国产一区二区三区蜜臀 | 色综合久久九月婷婷色综合| 爽好久久久欧美精品| 精品国产一区a| 91亚洲资源网| 日韩高清在线一区| 国产精品午夜在线| 欧美日韩一区二区在线观看| 亚洲电影第三页| 国产日韩av一区| 欧美午夜精品久久久久久孕妇| 裸体一区二区三区| 久久99在线观看| 日本一区二区电影| 91精品国产黑色紧身裤美女| 国产suv精品一区二区6| 亚洲狠狠爱一区二区三区| 精品乱人伦一区二区三区| 99久久精品一区| 激情五月播播久久久精品| 国产精品久久久久一区二区三区| 欧美天堂亚洲电影院在线播放| 极品尤物av久久免费看| 一级做a爱片久久| 久久亚洲综合色| 欧美日韩国产成人在线免费| 成人手机在线视频| 麻豆91免费看| 亚洲成人av一区二区三区| 国产精品久久看| 精品国一区二区三区| 欧美日韩免费观看一区三区| 懂色av中文字幕一区二区三区| 日韩和欧美一区二区三区| 亚洲人成影院在线观看| 国产日产欧美精品一区二区三区| 欧美精品日韩综合在线| 色呦呦网站一区| 成人激情免费网站| 国产揄拍国内精品对白| 美国十次综合导航| 日韩不卡一区二区| 亚洲午夜一区二区| 亚洲欧美区自拍先锋| 亚洲成人免费视频| 玉米视频成人免费看| 日韩一区中文字幕| 欧美激情综合网| 国产亚洲欧美在线| 久久噜噜亚洲综合| 亚洲精品在线一区二区| 日韩亚洲欧美在线| 日韩一区二区免费高清| 欧美亚洲另类激情小说| 欧美综合视频在线观看| 91黄色在线观看| 日本精品视频一区二区| 色综合久久久久综合体桃花网| 99精品视频在线播放观看| eeuss国产一区二区三区| 国产mv日韩mv欧美| av一区二区三区四区| 成人av集中营| 成人av网站在线| 色婷婷久久久亚洲一区二区三区| 99在线热播精品免费| 99综合电影在线视频| 色综合色综合色综合色综合色综合| 9i在线看片成人免费| 91福利在线观看| 欧美日韩一二区| 日韩一二三区不卡| 久久久久久久久久美女| 日韩美女视频一区| 亚洲一区二区三区四区五区黄| 亚洲成人第一页| 久久精品国产久精国产| 国产黑丝在线一区二区三区| 风流少妇一区二区| 91激情在线视频| 欧美tickling挠脚心丨vk| 国产色婷婷亚洲99精品小说| 中文字幕一区免费在线观看| 亚洲国产欧美在线人成| 看片的网站亚洲| jlzzjlzz亚洲日本少妇| 在线不卡免费欧美| 国产欧美日韩另类一区| 一区二区视频在线看| 免费看日韩a级影片| 国产成人在线看| 欧美日韩精品欧美日韩精品一综合| 日韩一区二区免费电影| 国产精品高清亚洲| 高清不卡一二三区| 欧美日韩日日骚| 国产欧美日韩一区二区三区在线观看| 一区二区三区在线观看网站| 久久成人羞羞网站| 一本大道av一区二区在线播放| 日韩欧美一区在线观看| 综合久久给合久久狠狠狠97色 | 风间由美一区二区av101| 欧美午夜在线一二页| 久久久久亚洲蜜桃| 亚洲第一电影网| 国产suv精品一区二区6| 欧美一区二区视频在线观看| 亚洲四区在线观看| 国产真实乱偷精品视频免| 在线观看不卡一区| 久久久美女毛片| 蜜芽一区二区三区| 欧美在线免费观看亚洲| 日本一区二区三区免费乱视频| 午夜精品久久久久影视| 91女厕偷拍女厕偷拍高清| 欧美草草影院在线视频| 五月天欧美精品| 91亚洲精品久久久蜜桃| 久久综合色8888| 美女看a上一区| 欧美日韩久久不卡| 亚洲欧美色综合| 9久草视频在线视频精品| 久久久亚洲精华液精华液精华液| 日韩vs国产vs欧美| 欧美日韩一二三区| 亚洲国产欧美另类丝袜| 色综合久久久久网| 中文字幕欧美一| 国产91综合一区在线观看| 久久伊人蜜桃av一区二区| 久久精品国内一区二区三区| 欧美一区二区三区人| 亚洲成国产人片在线观看| 欧美优质美女网站| 一区二区三区在线视频播放| 97久久超碰国产精品电影| 中文字幕av资源一区| 成人激情综合网站| 欧美国产精品中文字幕| 成人av在线资源| 亚洲精品伦理在线| 在线日韩av片| 日韩精品一级中文字幕精品视频免费观看| 欧美视频在线观看一区|