All Projects → thanhpk → randstr

thanhpk / randstr

Licence: MIT License
Golang secure random string

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to randstr

Generatedata
A powerful, feature-rich, random test data generator.
Stars: ✭ 1,883 (+2842.19%)
Mutual labels:  random-generation
perlin-toolkit
Animated perlin noise textures
Stars: ✭ 15 (-76.56%)
Mutual labels:  random-generation
nes-runner
An infinite runner NES game!
Stars: ✭ 28 (-56.25%)
Mutual labels:  random-generation
Stat
Statistics package for Go [DEPRECATED]
Stars: ✭ 198 (+209.38%)
Mutual labels:  random-generation
witnet-solidity-bridge
Witnet Bridge for EVM-compatible blockchains
Stars: ✭ 46 (-28.12%)
Mutual labels:  random-generation
mysql-random-data-generator
This is the easiest MySQL random test data generator tool. Load the procedure and execute to auto detect column types and load data.
Stars: ✭ 108 (+68.75%)
Mutual labels:  random-generation
Fluky
🎲 Loading based on random icons
Stars: ✭ 136 (+112.5%)
Mutual labels:  random-generation
insomnia-plugin-chance
Insomnia Plugin for Chance.JS
Stars: ✭ 15 (-76.56%)
Mutual labels:  random-generation
8 bit hubble
Generate random pixel art galaxies! In honor of Hubble Space Telescope, SNES videogames and Bob Ross
Stars: ✭ 59 (-7.81%)
Mutual labels:  random-generation
strgen
A Python module for a template language that generates randomized data
Stars: ✭ 34 (-46.87%)
Mutual labels:  random-generation
RandomGenKt
Kotlin port of RandomGen
Stars: ✭ 28 (-56.25%)
Mutual labels:  random-generation
jRand
A Java library to generate random data for all sorts of things. Java random data faker
Stars: ✭ 27 (-57.81%)
Mutual labels:  random-generation
datagen
Java lib that generates random data (numbers, strings, dates) - mostly to facilitate Randomized Testing.
Stars: ✭ 56 (-12.5%)
Mutual labels:  random-generation
Pydbgen
Random dataframe and database table generator
Stars: ✭ 191 (+198.44%)
Mutual labels:  random-generation
Linear Feedback Shift Register
Linear Feedback Shift Register
Stars: ✭ 34 (-46.87%)
Mutual labels:  random-generation
Design Of Experiment Python
Design-of-experiment (DOE) generator for science, engineering, and statistics
Stars: ✭ 143 (+123.44%)
Mutual labels:  random-generation
random-logger
Docker image for a random log generator.
Stars: ✭ 104 (+62.5%)
Mutual labels:  random-generation
relude-random
Composable random generators based on the PCG paper
Stars: ✭ 15 (-76.56%)
Mutual labels:  random-generation
lib12
lib12 is a library of universal helpers and extensions useful in any .NET project
Stars: ✭ 30 (-53.12%)
Mutual labels:  random-generation
arbitrater
Arbitrater is a Kotlin library for creating arbitrary instances of classes by reflection for use in testing. In contrast to POJO generators, it supports Kotlin's optional parameters and nullable types.
Stars: ✭ 33 (-48.44%)
Mutual labels:  random-generation

Randstr

GoDoc

Randstr is an Go library for generating secure random strings

Install

  go get -u github.com/thanhpk/randstr

Usage

Generate a random hex string

token := randstr.Hex(16) // generate 128-bit hex string

Running example

  package main
  import(
    "github.com/thanhpk/randstr"
    "fmt"
  )

  func main() {
    for i := 0; i < 5; i++ {
      token := randstr.Hex(16) // generate 128-bit hex string
      fmt.Println(token)
    }
  }
  // Output:
  // 67aab2d956bd7cc621af22cfb169cba8
  // 226eeb52947edbf3e97d1e6669e212c2
  // 5f3615e95d103d14ffb5b655aa0eec1e
  // ff3ab4efbd74025b87b14b59422d304c
  // a6705813c174ca73ed795ea0bab12726

Generate a random ASCII string

token := randstr.String(16) // generate a random 16 character length string

Running example

  package main
  import(
    "github.com/thanhpk/randstr"
    "fmt"
  )

  func main() {
    for i := 0; i < 5; i++ {
      token := randstr.String(16)
      fmt.Println(token)
    }
  }
  // Output:
  // 7EbxkrHc1l3Ahmyr
  // I5XH2gc1EEHgbmGI
  // GlCycMpsxGkn9cDQ
  // U2OfBDQoak0z8FwV
  // kDX1m81u14YwEiCY

License License: MIT

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].