aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpukkamustard <pukkamustard@posteo.net>2021-04-08 09:46:04 +0200
committerpukkamustard <pukkamustard@posteo.net>2021-04-08 09:48:27 +0200
commit513c69881232584e965abc3fbcaca351e2266072 (patch)
tree6114f7623f5f6b2aa76e00eda95a96dc8250f69b
parent0e57529d5ef5c6793caeeaf969ebe100bd6b34bb (diff)
crypto: fix pug in unpad when entire buffer is paddingno-sodium
-rw-r--r--src/crypto.js4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/crypto.js b/src/crypto.js
index 4fe69cb..a06de6f 100644
--- a/src/crypto.js
+++ b/src/crypto.js
@@ -54,10 +54,6 @@ module.exports = {
}
}, false)
- if (!n) {
- throw new Error('invalid padding')
- }
-
return buf.slice(0, n)
},