hex

package
v2.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HexCmd cobra.Command = cobra.Command{
	Use:   "hex",
	Short: "generate random bytes in hex",
	Long:  "generate random bytes in hex",
	Run: func(cmd *cobra.Command, args []string) {
		buf := make([]byte, size)
		var er error
		if capital {
			for range lines {
				_, er = rand.Read(buf)
				if er != nil {
					panic(er)
				}
				fmt.Printf("%X\n", buf)
			}
		} else {
			for range lines {
				_, er = rand.Read(buf)
				if er != nil {
					panic(er)
				}
				fmt.Printf("%x\n", buf)
			}
		}
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL