randgen

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 14 Imported by: 0

README

RandGen

Go Reference Go Report Card Release Status License

RandGen is a simple CLI tool to generate random data of a given size.

CLI Usage

Download the latest binary from the releases page and add it to your path.

Homebrew

RandGen can be installed with brew using the following command on macOS

brew install shibme/tap/randgen
Install Script
Install Latest Version

With Shell (MacOs/Linux):

curl -fsSL https://dev.shib.me/randgen/install.sh | sh

With PowerShell (Windows):

irm https://dev.shib.me/randgen/install.ps1 | iex
Install Specific Version

With Shell (MacOs/Linux):

curl -fsSL https://dev.shib.me/randgen/install.sh | sh -s v1.1.0

With PowerShell (Windows):

$v="1.1.0"; irm https://dev.shib.me/randgen/install.ps1 | iex
Docker

You can also run RandGen without installing, using Docker:

docker run --rm -v $PWD:/workspace -it ghcr.io/shibme/randgen help

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFile

func CreateFile(file string, size int, secure bool) error

func GetData added in v0.3.0

func GetData(size int, secure bool) ([]byte, error)

func Verify added in v0.1.0

func Verify(r io.Reader) (string, error)

func VerifyData added in v0.3.0

func VerifyData(data []byte) (string, error)

func VerifyFile added in v0.1.0

func VerifyFile(file string) (string, error)

func WriteRand added in v0.1.0

func WriteRand(w io.Writer, size int, secure bool) error

Types

type RandReader

type RandReader struct {
	// contains filtered or unexported fields
}

func NewRandReader

func NewRandReader(limit int, secureRandom bool) (*RandReader, error)

func (*RandReader) Read

func (r *RandReader) Read(p []byte) (int, error)

Directories

Path Synopsis
internal
api

Jump to

Keyboard shortcuts

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