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

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

?? sha.cpp

?? 300種加密解密算法(C++)源代碼,在VC下編譯通過
?? 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九九99九九九视频精品| 粗大黑人巨茎大战欧美成人| 不卡电影一区二区三区| 91视频在线看| 欧美日韩高清一区二区三区| 欧美电影在哪看比较好| 日韩免费性生活视频播放| 久久一区二区三区国产精品| 国产女人18水真多18精品一级做| 国产精品天干天干在线综合| 最新高清无码专区| 午夜欧美视频在线观看| 美国欧美日韩国产在线播放| 国产精品系列在线播放| av在线一区二区| 精品视频123区在线观看| 日韩一级欧美一级| 国产欧美在线观看一区| 亚洲一区二区视频| 精品一区二区三区在线观看国产| 成年人午夜久久久| 欧美日韩精品二区第二页| 精品粉嫩aⅴ一区二区三区四区| 国产欧美日韩不卡| 亚洲在线视频免费观看| 久久精品99久久久| 99久久er热在这里只有精品15| 精品视频在线看| 国产精品网站在线播放| 亚洲va天堂va国产va久| 国产成人免费视频| 一本久久a久久精品亚洲| 日韩一区二区免费在线电影| 日韩美女视频一区| 极品少妇一区二区| 欧美乱妇20p| 国产精品久久久久桃色tv| 老司机精品视频线观看86| 91麻豆高清视频| 久久久久久99久久久精品网站| 亚洲国产精品久久久久秋霞影院| 粉嫩绯色av一区二区在线观看| 欧美日韩精品高清| 日韩理论片一区二区| 国产原创一区二区| 日韩午夜av一区| 亚洲一区在线免费观看| 99久久综合国产精品| 精品国产欧美一区二区| 午夜精品久久久久久久99樱桃| 成人18精品视频| 国产精品天天看| 国产成人av电影在线观看| 日韩欧美中文字幕一区| 性久久久久久久| 欧美日韩一区二区不卡| 亚洲精品v日韩精品| 94-欧美-setu| 国产精品久久久久9999吃药| 国产成人免费视频网站| 久久久久久久久久电影| 精品一区二区日韩| 精品国产区一区| 国产一区二区在线观看免费| 精品国内片67194| 经典三级视频一区| 亚洲精品一区二区三区四区高清| 激情综合色丁香一区二区| 精品国产一区二区三区久久久蜜月| 日韩av在线发布| 欧美mv和日韩mv的网站| 极品尤物av久久免费看| 国产日韩欧美综合一区| 国产精品12区| 亚洲欧美日韩国产一区二区三区| 91麻豆文化传媒在线观看| 亚洲精品免费在线观看| 在线观看国产91| 免费在线观看视频一区| 日韩精品一区二区三区视频在线观看 | 午夜久久久久久久久久一区二区| 欧美日韩一区高清| 日韩av电影免费观看高清完整版 | 18涩涩午夜精品.www| 91香蕉视频污在线| 亚洲一区二区偷拍精品| 欧美一卡2卡三卡4卡5免费| 麻豆一区二区在线| 日本一区二区三区在线观看| eeuss鲁一区二区三区| 亚洲欧美日韩在线播放| 56国语精品自产拍在线观看| 久久精品久久精品| 亚洲国产成人私人影院tom | 日韩欧美综合一区| 国产毛片精品国产一区二区三区| 成人免费在线视频| 欧美揉bbbbb揉bbbbb| 国产精品资源在线看| 亚洲女人的天堂| 久久久影视传媒| 欧美性大战久久久| 国产精华液一区二区三区| 一个色妞综合视频在线观看| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 亚洲国产高清aⅴ视频| 欧美三级日韩在线| 国产999精品久久久久久 | 日韩欧美一级片| 一本一本大道香蕉久在线精品 | 欧美一级精品在线| 99精品在线观看视频| 精品在线亚洲视频| 亚洲高清三级视频| 国产欧美精品国产国产专区| 精品视频在线看| 99v久久综合狠狠综合久久| 欧美aaaaa成人免费观看视频| 亚洲色图欧美偷拍| 久久精品视频在线免费观看| 欧美高清www午色夜在线视频| 成av人片一区二区| 国产精品一级片| 日韩av电影一区| 亚洲福利视频三区| 亚洲欧洲av色图| 久久久久国产精品麻豆| 精品久久久久久最新网址| 777午夜精品免费视频| 91久久奴性调教| 97se亚洲国产综合自在线| 国产精品99久久久| 国产一区二区三区美女| 久久99最新地址| 男男视频亚洲欧美| 免费人成在线不卡| 日韩av网站在线观看| 日韩中文字幕麻豆| 午夜久久久久久电影| 丝袜美腿亚洲综合| 日本免费在线视频不卡一不卡二| 婷婷综合五月天| 日韩精品五月天| 男女男精品视频| 国模一区二区三区白浆| 国产在线日韩欧美| 国产乱码精品1区2区3区| 国产伦精品一区二区三区免费| 久久69国产一区二区蜜臀| 韩国成人在线视频| 国产精品538一区二区在线| 国产精品小仙女| 99久久99久久精品国产片果冻| 91蝌蚪porny| 欧美性受极品xxxx喷水| 色婷婷综合中文久久一本| 欧美日韩黄色一区二区| 欧美精品久久天天躁| 日韩视频在线永久播放| 久久久久久久久久美女| 成人欧美一区二区三区小说| 亚洲一区二区不卡免费| 青娱乐精品视频在线| 国产伦精品一区二区三区视频青涩| 成人永久免费视频| 91麻豆精品视频| 91麻豆精品91久久久久同性| 欧美大黄免费观看| 中文字幕日本乱码精品影院| 亚洲一区二区三区免费视频| 男女男精品视频| voyeur盗摄精品| 欧美精选午夜久久久乱码6080| 日韩女优av电影| 中文字幕中文字幕一区二区| 亚洲制服丝袜在线| 国产综合久久久久久鬼色| av中文字幕在线不卡| 欧美日韩高清在线播放| 国产欧美精品国产国产专区| 亚洲成a人片综合在线| 国产精品66部| 欧美疯狂性受xxxxx喷水图片| 国产三级精品视频| 日韩精品一二区| 91蜜桃视频在线| 久久日一线二线三线suv| 亚洲影院免费观看| 国产精品正在播放| 日韩一区二区精品| 一区二区三区精品| 国产999精品久久久久久绿帽|