Loading lib/kinetic.js +18 −0 Original line number Diff line number Diff line Loading @@ -464,6 +464,15 @@ class PDU extends stream.Readable { return this._command.header.connectionID.toNumber(); } /** * Gets the tag * * @returns {Buffer} - the tag. */ getTag() { return this.getSlice(this._command.body.keyValue.tag); } /** * Test the HMAC integrity between the actual instance and the given HMAC * @param {Buffer} hmac - the non instance hmac to compare Loading @@ -475,6 +484,15 @@ class PDU extends stream.Readable { return this.getHMAC().equals(hmac); } /** * Test the Tag integrity between the actual instance and the given tag * @param {Buffer} tag - the non instance tag to compare * @returns {Boolean} - whether tag matches or not */ checkTagIntegrity(tag) { return this.getTag().equals(tag); } /* * Internal implementation of the `stream.Readable` class. */ Loading Loading
lib/kinetic.js +18 −0 Original line number Diff line number Diff line Loading @@ -464,6 +464,15 @@ class PDU extends stream.Readable { return this._command.header.connectionID.toNumber(); } /** * Gets the tag * * @returns {Buffer} - the tag. */ getTag() { return this.getSlice(this._command.body.keyValue.tag); } /** * Test the HMAC integrity between the actual instance and the given HMAC * @param {Buffer} hmac - the non instance hmac to compare Loading @@ -475,6 +484,15 @@ class PDU extends stream.Readable { return this.getHMAC().equals(hmac); } /** * Test the Tag integrity between the actual instance and the given tag * @param {Buffer} tag - the non instance tag to compare * @returns {Boolean} - whether tag matches or not */ checkTagIntegrity(tag) { return this.getTag().equals(tag); } /* * Internal implementation of the `stream.Readable` class. */ Loading