Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: src/liblzma/check/sha256.c

Issue 62403002: Update XZ Utils to 5.0.5 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/xz/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/liblzma/api/lzma/version.h ('k') | src/liblzma/common/alone_decoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /////////////////////////////////////////////////////////////////////////////// 1 ///////////////////////////////////////////////////////////////////////////////
2 // 2 //
3 /// \file sha256.c 3 /// \file sha256.c
4 /// \brief SHA-256 4 /// \brief SHA-256
5 /// 5 ///
6 /// \todo Crypto++ has x86 ASM optimizations. They use SSE so if they 6 /// \todo Crypto++ has x86 ASM optimizations. They use SSE so if they
7 /// are imported to liblzma, SSE instructions need to be used 7 /// are imported to liblzma, SSE instructions need to be used
8 /// conditionally to keep the code working on older boxes. 8 /// conditionally to keep the code working on older boxes.
9 /// We could also support using some external libary for SHA-256.
10 // 9 //
11 // This code is based on the code found from 7-Zip, which has a modified 10 // This code is based on the code found from 7-Zip, which has a modified
12 // version of the SHA-256 found from Crypto++ <http://www.cryptopp.com/>. 11 // version of the SHA-256 found from Crypto++ <http://www.cryptopp.com/>.
13 // The code was modified a little to fit into liblzma. 12 // The code was modified a little to fit into liblzma.
14 // 13 //
15 // Authors: Kevin Springle 14 // Authors: Kevin Springle
16 // Wei Dai 15 // Wei Dai
17 // Igor Pavlov 16 // Igor Pavlov
18 // Lasse Collin 17 // Lasse Collin
19 // 18 //
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 191
193 check->buffer.u64[(64 - 8) / 8] = conv64be(check->state.sha256.size); 192 check->buffer.u64[(64 - 8) / 8] = conv64be(check->state.sha256.size);
194 193
195 process(check); 194 process(check);
196 195
197 for (size_t i = 0; i < 8; ++i) 196 for (size_t i = 0; i < 8; ++i)
198 check->buffer.u32[i] = conv32be(check->state.sha256.state[i]); 197 check->buffer.u32[i] = conv32be(check->state.sha256.state[i]);
199 198
200 return; 199 return;
201 } 200 }
OLDNEW
« no previous file with comments | « src/liblzma/api/lzma/version.h ('k') | src/liblzma/common/alone_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698