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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/product_registry_impl/sha1/sha1.js

Issue 2839273003: [Devtools] New structure and colorize rows for network products (Closed)
Patch Set: Merge remote-tracking branch 'origin/master' into NEW_DEPENDENCY_PRODUCTS Created 3 years, 7 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 | « third_party/WebKit/Source/devtools/front_end/product_registry_impl/sha1/README.chromium ('k') | no next file » | 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 * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined 2 * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
3 * in FIPS 180-1 3 * in FIPS 180-1
4 * Version 2.2 Copyright Paul Johnston 2000 - 2009. 4 * Version 2.2 Copyright Paul Johnston 2000 - 2009.
5 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet 5 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
6 * Distributed under the BSD License 6 * Distributed under the BSD License
7 * See http://pajhome.org.uk/crypt/md5 for details. 7 * See http://pajhome.org.uk/crypt/md5 for details.
8 */ 8 */
9 // clang-format off 9 // clang-format off
10 /* eslint-disable */ 10 /* eslint-disable */
11 /** 11 /**
12 * @param {string} str 12 * @param {string} str
13 * @return {string} 13 * @return {string}
14 */ 14 */
15 ProductRegistry.sha1 = function(str) { 15 ProductRegistryImpl.sha1 = function(str) {
16 return rstr2hex(rstr_sha1(str2rstr_utf8(str))); 16 return rstr2hex(rstr_sha1(str2rstr_utf8(str)));
17 17
18 /** 18 /**
19 * Calculate the SHA1 of a raw string 19 * Calculate the SHA1 of a raw string
20 * @param {string} s 20 * @param {string} s
21 * @return {string} 21 * @return {string}
22 */ 22 */
23 function rstr_sha1(s) 23 function rstr_sha1(s)
24 { 24 {
25 return binb2rstr(binb_sha1(rstr2binb(s), s.length * 8)); 25 return binb2rstr(binb_sha1(rstr2binb(s), s.length * 8));
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 * Bitwise rotate a 32-bit number to the left. 211 * Bitwise rotate a 32-bit number to the left.
212 * @param {number} num 212 * @param {number} num
213 * @param {number} cnt 213 * @param {number} cnt
214 * @return {number} 214 * @return {number}
215 */ 215 */
216 function bit_rol(num, cnt) 216 function bit_rol(num, cnt)
217 { 217 {
218 return (num << cnt) | (num >>> (32 - cnt)); 218 return (num << cnt) | (num >>> (32 - cnt));
219 } 219 }
220 }; 220 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/product_registry_impl/sha1/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698