first sources: batman
This commit is contained in:
9
src/key.gleam
Normal file
9
src/key.gleam
Normal file
@@ -0,0 +1,9 @@
|
||||
import gleam/bit_array
|
||||
import gleam/crypto
|
||||
|
||||
const key_length_bytes = 12
|
||||
|
||||
pub fn generate() -> String {
|
||||
crypto.strong_random_bytes(key_length_bytes)
|
||||
|> bit_array.base64_url_encode(False)
|
||||
}
|
||||
Reference in New Issue
Block a user