PHP WebShell

Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@stablelib/sha384/lib

Просмотр файла: sha384.js

"use strict";
// Copyright (C) 2016 Dmitry Chestnykh
// MIT License. See LICENSE file for details.
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * Package sha384 implements SHA-2-384 cryptographic hash function.
 */
var sha512_1 = require("@stablelib/sha512");
exports.DIGEST_LENGTH = 48;
exports.BLOCK_SIZE = 128;
/**
 * SHA2-384 cryptographic hash algorithm.
 *
 * SHA-384 is the same algorithm as SHA-512, but with
 * different initialization vectors and digest length.
 */
var SHA384 = /** @class */ (function (_super) {
    __extends(SHA384, _super);
    function SHA384() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.digestLength = exports.DIGEST_LENGTH;
        return _this;
    }
    SHA384.prototype._initState = function () {
        this._stateHi[0] = 0xcbbb9d5d;
        this._stateHi[1] = 0x629a292a;
        this._stateHi[2] = 0x9159015a;
        this._stateHi[3] = 0x152fecd8;
        this._stateHi[4] = 0x67332667;
        this._stateHi[5] = 0x8eb44a87;
        this._stateHi[6] = 0xdb0c2e0d;
        this._stateHi[7] = 0x47b5481d;
        this._stateLo[0] = 0xc1059ed8;
        this._stateLo[1] = 0x367cd507;
        this._stateLo[2] = 0x3070dd17;
        this._stateLo[3] = 0xf70e5939;
        this._stateLo[4] = 0xffc00b31;
        this._stateLo[5] = 0x68581511;
        this._stateLo[6] = 0x64f98fa7;
        this._stateLo[7] = 0xbefa4fa4;
    };
    return SHA384;
}(sha512_1.SHA512));
exports.SHA384 = SHA384;
function hash(data) {
    var h = new SHA384();
    h.update(data);
    var digest = h.digest();
    h.clean();
    return digest;
}
exports.hash = hash;
//# sourceMappingURL=sha384.js.map

Выполнить команду


Для локальной разработки. Не используйте в интернете!