Skip to content
Snippets Groups Projects
util.go 178 B
Newer Older
  • Learn to ignore specific revisions
  • package crypto
    
    import "crypto/rand"
    
    func Random256Bit() ([]byte, error) {
    	b := make([]byte, 32)
    	_, err := rand.Read(b)
    	if err != nil {
    		return nil, err
    	}
    	return b, nil
    }