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

Side by Side Diff: webrtc/rtc_base/sha1.h

Issue 2877023002: Move webrtc/{base => rtc_base} (Closed)
Patch Set: update presubmit.py and DEPS include rules Created 3 years, 5 months 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
« no previous file with comments | « webrtc/rtc_base/sequenced_task_checker_unittest.cc ('k') | webrtc/rtc_base/sha1.cc » ('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 * SHA-1 in C 2 * SHA-1 in C
3 * By Steve Reid <sreid@sea-to-sky.net> 3 * By Steve Reid <sreid@sea-to-sky.net>
4 * 100% Public Domain 4 * 100% Public Domain
5 * 5 *
6 */ 6 */
7 7
8 // Ported to C++, Google style, under namespace rtc. 8 // Ported to C++, Google style, under namespace rtc.
9 9
10 #ifndef WEBRTC_BASE_SHA1_H_ 10 #ifndef WEBRTC_RTC_BASE_SHA1_H_
11 #define WEBRTC_BASE_SHA1_H_ 11 #define WEBRTC_RTC_BASE_SHA1_H_
12 12
13 #include <stdint.h> 13 #include <stdint.h>
14 #include <stdlib.h> 14 #include <stdlib.h>
15 15
16 namespace rtc { 16 namespace rtc {
17 17
18 struct SHA1_CTX { 18 struct SHA1_CTX {
19 uint32_t state[5]; 19 uint32_t state[5];
20 // TODO: Change bit count to uint64_t. 20 // TODO: Change bit count to uint64_t.
21 uint32_t count[2]; // Bit count of input. 21 uint32_t count[2]; // Bit count of input.
22 uint8_t buffer[64]; 22 uint8_t buffer[64];
23 }; 23 };
24 24
25 #define SHA1_DIGEST_SIZE 20 25 #define SHA1_DIGEST_SIZE 20
26 26
27 void SHA1Init(SHA1_CTX* context); 27 void SHA1Init(SHA1_CTX* context);
28 void SHA1Update(SHA1_CTX* context, const uint8_t* data, size_t len); 28 void SHA1Update(SHA1_CTX* context, const uint8_t* data, size_t len);
29 void SHA1Final(SHA1_CTX* context, uint8_t digest[SHA1_DIGEST_SIZE]); 29 void SHA1Final(SHA1_CTX* context, uint8_t digest[SHA1_DIGEST_SIZE]);
30 30
31 #endif // WEBRTC_BASE_SHA1_H_ 31 } // namespace rtc
32 32
33 } // namespace rtc 33 #endif // WEBRTC_RTC_BASE_SHA1_H_
OLDNEW
« no previous file with comments | « webrtc/rtc_base/sequenced_task_checker_unittest.cc ('k') | webrtc/rtc_base/sha1.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698