From b636afc4bd411e3c378218cae57e5ef241dbbb4a Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Mon, 14 Jun 2021 08:45:48 +0200 Subject: [PATCH] fix(publicId): generate 128-bit instead of 128-byte value Signed-off-by: Philip Molares --- src/notes/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/notes/utils.ts b/src/notes/utils.ts index cbb907171..9f8f87153 100644 --- a/src/notes/utils.ts +++ b/src/notes/utils.ts @@ -12,6 +12,6 @@ import { randomBytes } from 'crypto'; * This is a randomly generated 128-bit value encoded with base32-encode using the crockford variant and converted to lowercase. */ export function generatePublicId(): string { - const randomId = randomBytes(128); + const randomId = randomBytes(16); return base32Encode(randomId, 'Crockford').toLowerCase(); }