Skip to content

How do I generate a secure random string? #4701

Discussion options

You must be logged in to vote

Hello! The way to go about it would be to base64 (or base16) encode the bit array, that will never fail to produce a valid UTF8 encoded string. For that you can use the bit_array.base64_encode function from stdlib

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by evaogbe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants