From 99af8a369e60c46b324737c2d08e99111e485d62 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Tue, 25 May 2021 23:33:29 +0200 Subject: [PATCH] fix: handle case where the key have no cypher gpg may have packet that looks like: gnu-dummy S2K, algo: 0, simple checksum, hash: 0 --- lib/pgp.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/pgp.js b/lib/pgp.js index 72adaca19..374e936ff 100644 --- a/lib/pgp.js +++ b/lib/pgp.js @@ -1164,6 +1164,8 @@ class CipherParams extends bio.Struct { blockSize() { switch (this.cipher) { + case cipherTypes.NONE: + return 0; case cipherTypes.IDEA: case cipherTypes.DES3: case cipherTypes.CAST5: