mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-01-06 13:52:18 +00:00
fix(publicId): generate 128-bit instead of 128-byte value
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
10f92de94e
commit
b636afc4bd
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue