secure jwt

This commit is contained in:
2024-10-02 11:42:33 -05:00
parent 57b5308ca9
commit 61b03070b4
11 changed files with 60 additions and 1 deletions

14
secure_bytes.sh Normal file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
# Define the number of bytes you want to generate
num_bytes=16
# Use dd to read cryptographically secure bytes from /dev/urandom
# and convert them to integers using od
secure_bytes=$(dd if=/dev/urandom bs=1 count=$num_bytes 2>/dev/null | od -An -tu1)
# Remove leading/trailing spaces and replace spaces with commas
secure_bytes=$(echo $secure_bytes | sed 's/ /,/g')
# Output the result as a comma-separated list of integers
echo "Cryptographically secure bytes (as integers): $secure_bytes"