Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/sites/node_modules/aws-sdk/lib/ drwxr-xr-x | |
| Viewing file: Select action/file-type: var hashUtils = require('./browserHashUtils');
/**
* @api private
*/
function Hmac(hashCtor, secret) {
this.hash = new hashCtor();
this.outer = new hashCtor();
var inner = bufferFromSecret(hashCtor, secret);
var outer = new Uint8Array(hashCtor.BLOCK_SIZE);
outer.set(inner);
for (var i = 0; i < hashCtor.BLOCK_SIZE; i++) {
inner[i] ^= 0x36;
outer[i] ^= 0x5c;
}
this.hash.update(inner);
this.outer.update(outer);
// Zero out the copied key buffer.
for (var i = 0; i < inner.byteLength; i++) {
inner[i] = 0;
}
}
/**
* @api private
*/
module.exports = exports = Hmac;
Hmac.prototype.update = function (toHash) {
if (hashUtils.isEmptyData(toHash) || this.error) {
return this;
}
try {
this.hash.update(hashUtils.convertToBuffer(toHash));
} catch (e) {
this.error = e;
}
return this;
};
Hmac.prototype.digest = function (encoding) {
if (!this.outer.finished) {
this.outer.update(this.hash.digest());
}
return this.outer.digest(encoding);
};
function bufferFromSecret(hashCtor, secret) {
var input = hashUtils.convertToBuffer(secret);
if (input.byteLength > hashCtor.BLOCK_SIZE) {
var bufferHash = new hashCtor;
bufferHash.update(input);
input = bufferHash.digest();
}
var buffer = new Uint8Array(hashCtor.BLOCK_SIZE);
buffer.set(input);
return buffer;
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0431 ]-- |