module Nanoid

Defined in:

nanoid.cr

Constant Summary

SAFE_ALPHABET = "_-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
VERSION = {{ (`shards version /srv/crystaldoc.info/github-mamantoha-nanoid.cr-v0.7.1/src`).chomp.stringify }}

Class Method Summary

Class Method Detail

def self.complex_generate(size : Int32, alphabet : String) : String #

Generate secure URL-friendly unique ID


[View source]
def self.generate(size = 21, alphabet = SAFE_ALPHABET, secure = true) : String #

[View source]
def self.non_secure_generate(size : Int32, alphabet : String) : String #

Non-secure predictable random generator


[View source]
def self.simple_generate(size : Int32) : String #

[View source]