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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sha.cpp

?? 常見加密算法匯總的C++實現(xiàn)
?? 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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩西西人体444www| 综合激情网...| 久久久精品黄色| 亚洲国产日韩在线一区模特| 国产一区二区三区国产| 色诱视频网站一区| 久久综合视频网| 亚洲成人av电影在线| 豆国产96在线|亚洲| 欧美一区二区三区喷汁尤物| 亚洲三级电影网站| 夫妻av一区二区| 精品久久久久久久久久久久久久久| 亚洲最大成人网4388xx| 成人黄色一级视频| 久久午夜色播影院免费高清 | 久久精品亚洲麻豆av一区二区 | 欧美激情一区二区三区在线| 日日欢夜夜爽一区| 欧美亚洲国产bt| 日韩毛片在线免费观看| 成人黄色a**站在线观看| 久久影院电视剧免费观看| 亚洲成人一区在线| 欧美日韩中文精品| 亚洲v日本v欧美v久久精品| 色又黄又爽网站www久久| 中文字幕在线观看一区二区| 国产成人丝袜美腿| 久久蜜桃香蕉精品一区二区三区| 精品一区二区三区在线播放| 日韩欧美国产一区二区在线播放| 日韩国产在线观看| 6080yy午夜一二三区久久| 午夜一区二区三区视频| 欧美日韩小视频| 日韩中文欧美在线| 日韩三级在线免费观看| 极品少妇xxxx精品少妇| 精品国产一区二区三区av性色| 免费的成人av| 精品久久久久久久久久久院品网| 国内国产精品久久| 国产精品嫩草久久久久| 色视频欧美一区二区三区| 一区二区三区在线视频免费| 欧美三级中文字| 久久66热re国产| 国产欧美视频在线观看| 99久久国产综合精品色伊| 亚洲国产综合91精品麻豆| 欧美男女性生活在线直播观看| 免费精品视频最新在线| 久久网这里都是精品| 成人动漫av在线| 五月激情六月综合| 精品人在线二区三区| 国产suv精品一区二区6| 一区二区三区欧美在线观看| 欧美一区二区三区不卡| 高清不卡一二三区| 亚洲成a人在线观看| 欧美变态tickle挠乳网站| 北条麻妃国产九九精品视频| 夜夜精品浪潮av一区二区三区| 91精品在线免费观看| 国产精品乡下勾搭老头1| 亚洲永久精品大片| 精品国产伦理网| 91国偷自产一区二区三区成为亚洲经典| 日精品一区二区三区| 国产精品美日韩| 正在播放一区二区| av亚洲精华国产精华| 日韩电影在线一区二区三区| 国产精品全国免费观看高清 | 激情欧美日韩一区二区| 亚洲婷婷在线视频| 久久综合久色欧美综合狠狠| 一本色道久久综合精品竹菊| 精品亚洲成av人在线观看| 亚洲美女在线一区| 久久色中文字幕| 欧美日韩不卡一区| 成人一级视频在线观看| 奇米影视一区二区三区小说| 亚洲欧美aⅴ...| 国产日韩av一区二区| 3751色影院一区二区三区| 色婷婷激情一区二区三区| 极品少妇xxxx精品少妇偷拍| 五月天亚洲婷婷| 亚洲美女免费视频| 中文字幕一区二区三区色视频| 精品国产一区二区国模嫣然| 欧美美女黄视频| 欧美日韩一区不卡| 91成人免费电影| 成人h动漫精品一区二区| 国产精品一区二区黑丝| 黄色日韩网站视频| 美女一区二区久久| 日本不卡在线视频| 午夜免费久久看| 亚洲.国产.中文慕字在线| 一区二区三区蜜桃| 亚洲品质自拍视频| 亚洲精品视频免费看| 亚洲婷婷在线视频| 亚洲色图制服丝袜| 亚洲日本丝袜连裤袜办公室| 国产精品久久久久久久久久免费看 | 久久久蜜臀国产一区二区| 日韩精品一区二区三区视频播放| 91精品久久久久久久久99蜜臂| 欧美三级欧美一级| 欧美日本在线播放| 777午夜精品视频在线播放| 欧美精品日韩精品| 欧美一级二级三级乱码| 精品久久久久久久久久久久久久久| 3atv一区二区三区| 精品久久一区二区| 国产午夜精品福利| 国产精品国产三级国产有无不卡 | 另类小说视频一区二区| 日韩avvvv在线播放| 九一久久久久久| 国产成人av在线影院| 972aa.com艺术欧美| 在线一区二区视频| 欧美一区二区在线看| 久久久久高清精品| 综合色中文字幕| 香蕉久久一区二区不卡无毒影院| 麻豆91在线看| 成人小视频免费观看| 91国偷自产一区二区三区观看 | 一本大道av伊人久久综合| 欧美日本不卡视频| 久久久国产精品不卡| 中文字幕亚洲综合久久菠萝蜜| 亚洲欧洲日韩一区二区三区| 伊人婷婷欧美激情| 美女被吸乳得到大胸91| 成人黄色大片在线观看| 欧美日韩综合色| 久久久国际精品| 亚洲国产视频一区二区| 九九精品视频在线看| 色诱视频网站一区| 欧美sm美女调教| 亚洲欧洲制服丝袜| 狠狠色丁香婷综合久久| 一本久久a久久精品亚洲| 欧美xxx久久| 亚洲免费观看在线视频| 久久丁香综合五月国产三级网站 | 亚洲黄色录像片| 免费高清成人在线| 色88888久久久久久影院野外| 日韩网站在线看片你懂的| 中文字幕制服丝袜成人av| 免费美女久久99| 欧美性xxxxxx少妇| 欧美高清在线一区二区| 蜜臀99久久精品久久久久久软件| 9i在线看片成人免费| 日韩精品自拍偷拍| 樱桃视频在线观看一区| 国产99久久久久久免费看农村| 777a∨成人精品桃花网| 尤物av一区二区| eeuss影院一区二区三区| 精品国产乱子伦一区| 视频一区二区中文字幕| 91丨porny丨国产| 久久久久九九视频| 捆绑调教美女网站视频一区| 在线亚洲一区观看| 亚洲理论在线观看| 北条麻妃一区二区三区| 国产日产欧美精品一区二区三区| 美腿丝袜在线亚洲一区| 欧美日韩久久不卡| 亚洲一区二区视频| 99久久国产综合精品麻豆| 中文字幕不卡的av| 国产精品一区二区男女羞羞无遮挡| 欧美成人乱码一区二区三区| 日本亚洲最大的色成网站www| 欧美日韩亚洲综合| 亚洲午夜影视影院在线观看| 在线观看亚洲一区| 亚洲一区在线观看网站| 欧美亚洲综合网| 午夜视频在线观看一区| 在线成人午夜影院| 青青草97国产精品免费观看| 3d动漫精品啪啪1区2区免费|