chore(generate.util.ts): add documentation for generateRandomString32 function
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
parent
700c977659
commit
c30305ee5e
|
|
@ -1,5 +1,9 @@
|
|||
import { randomBytes } from 'crypto'
|
||||
|
||||
/**
|
||||
* Generates a cryptographically secure 32-byte random string, returned as a 64-character hex string.
|
||||
* @returns {string} A 64-character hexadecimal string.
|
||||
*/
|
||||
export function generateRandomString32(): string {
|
||||
return randomBytes(32).toString('hex')
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue