From a1bebe252e947916669e5033e3242cc890684b63 Mon Sep 17 00:00:00 2001 From: Andrey Pogoreltsev Date: Wed, 6 Nov 2024 11:57:42 +0200 Subject: [PATCH] Fix max 512Mb size --- ghash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghash.js b/ghash.js index 2dec6cf..70b6ac2 100644 --- a/ghash.js +++ b/ghash.js @@ -124,7 +124,7 @@ GHASH.prototype.final = function (abl, bl) { this.ghash(Buffer.concat([this.cache, ZEROES], 16)) } - this.ghash(fromArray([0, abl, 0, bl])) + this.ghash(fromArray([abl / 0x100000000, abl % 0x100000000, bl / 0x100000000, bl % 0x100000000])) return this.state }