module Nanoid

Defined in:

nanoid.cr

Constant Summary

SAFE_ALPHABET = "_-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
VERSION = {{ (`shards version /home/runner/work/nanoid.cr/nanoid.cr/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]