No release in over 3 years
https://github.com/colorfulcompany/slothful-code-generator
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

SlothfulCode

ある程度人間にとって扱いやすい長さ、複雑さで、類推しにくく、重複しないコードを生成、検証する

Installation

Add this line to your application's Gemfile:

gem 'slothful-code-generator'

And then execute:

$ bundle

Or install it yourself as:

$ gem install slothful-code-generator

Usage

require 'slothful_code'

ganerate

sc = SlothfulCode.new(<salt>)
sc.generate(type_id: '1') # => '989JV7WDCN6Q-1'

decode

sc = SlothfulCode.new(<salt>)
sc.decode(<code>) # => {:type_id=>'1', :time=>[1612769809, 113]}

valid?

sc = SlothfulCode.new(<salt>)
sc.valid?(<code>) # => true / false