Skip to content

Commit 7d9e1b8

Browse files
committed
nip44: add buffer too small err
will be used for nip44_encrypt Signed-off-by: William Casarin <[email protected]>
1 parent 705deec commit 7d9e1b8

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/nip44.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ const char *nip44_err_msg(enum ndb_decrypt_result res)
265265
return "error during base64 decoding";
266266
case NIP44_ERR_INVALID_PADDING:
267267
return "invalid padding";
268+
case NIP44_ERR_BUFFER_TOO_SMALL:
269+
return "buffer too small";
268270
}
269271

270272
return "unknown";

src/nip44.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ enum ndb_decrypt_result
1414
NIP44_ERR_FILL_RANDOM_FAILED = 7,
1515
NIP44_ERR_INVALID_MAC = 8,
1616
NIP44_ERR_INVALID_PADDING = 9,
17+
NIP44_ERR_BUFFER_TOO_SMALL = 10,
1718
};
1819

1920
struct nip44_payload {

0 commit comments

Comments
 (0)