Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package main
import (
"crypto/rand"
"encoding/hex"
"fmt"
"io"
"log"
)
func main() {
// La longitud será el doble de la capacidad del arreglo (64 en este caso)
var clave [64]byte
_, err := io.ReadFull(rand.Reader, clave[:])
if err != nil {
log.Fatal(err)
}
fmt.Println("Clave => ", hex.EncodeToString(clave[:]))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment