1 | ;(function (root, factory, undef) {
|
2 | if (typeof exports === "object") {
|
3 |
|
4 | module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512"));
|
5 | }
|
6 | else if (typeof define === "function" && define.amd) {
|
7 |
|
8 | define(["./core", "./x64-core", "./sha512"], factory);
|
9 | }
|
10 | else {
|
11 |
|
12 | factory(root.CryptoJS);
|
13 | }
|
14 | }(this, function (CryptoJS) {
|
15 |
|
16 | (function () {
|
17 |
|
18 | var C = CryptoJS;
|
19 | var C_x64 = C.x64;
|
20 | var X64Word = C_x64.Word;
|
21 | var X64WordArray = C_x64.WordArray;
|
22 | var C_algo = C.algo;
|
23 | var SHA512 = C_algo.SHA512;
|
24 |
|
25 | |
26 |
|
27 |
|
28 | var SHA384 = C_algo.SHA384 = SHA512.extend({
|
29 | _doReset: function () {
|
30 | this._hash = new X64WordArray.init([
|
31 | new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),
|
32 | new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),
|
33 | new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),
|
34 | new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)
|
35 | ]);
|
36 | },
|
37 |
|
38 | _doFinalize: function () {
|
39 | var hash = SHA512._doFinalize.call(this);
|
40 |
|
41 | hash.sigBytes -= 16;
|
42 |
|
43 | return hash;
|
44 | }
|
45 | });
|
46 |
|
47 | |
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 | C.SHA384 = SHA512._createHelper(SHA384);
|
62 |
|
63 | |
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 | C.HmacSHA384 = SHA512._createHmacHelper(SHA384);
|
78 | }());
|
79 |
|
80 |
|
81 | return CryptoJS.SHA384;
|
82 |
|
83 | })); |
\ | No newline at end of file |