Module: RandomToken

Defined in:
lib/random_token.rb

Class Method Summary (collapse)

Class Method Details

+ (Object) digest(token)



6
7
8
# File 'lib/random_token.rb', line 6

def self.digest(token)
  Digest::SHA1.hexdigest(token.to_s)
end

+ (Object) generate



2
3
4
# File 'lib/random_token.rb', line 2

def self.generate
  SecureRandom.urlsafe_base64
end