Debian Codegraph @

closure-library/closure/goog/crypt/sha224.js

raw
1 // Copyright 2012 The Closure Library Authors. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS-IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 /**
16 * @fileoverview SHA-224 cryptographic hash.
17 *
18 * Usage:
19 * var sha224 = new goog.crypt.Sha224();
20 * sha224.update(bytes);
21 * var hash = sha224.digest();
22 *
23 */
24
25 goog.provide('goog.crypt.Sha224');
26
27 goog.require('goog.crypt.Sha2');
28
29
30
31 /**
32 * SHA-224 cryptographic hash constructor.
33 *
34 * @constructor
35 * @extends {goog.crypt.Sha2}
36 * @final
37 * @struct
38 */
39 goog.crypt.Sha224 = function() {
40 goog.crypt.Sha224.base(
41 this, 'constructor', 7, goog.crypt.Sha224.INIT_HASH_BLOCK_);
42 };
43 goog.inherits(goog.crypt.Sha224, goog.crypt.Sha2);
44
45
46 /** @private {!Array<number>} */
47 goog.crypt.Sha224.INIT_HASH_BLOCK_ = [
48 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511,
49 0x64f98fa7, 0xbefa4fa4
50 ];