Module: Verge::Crypto

Extended by:
Crypto
Included in:
Crypto
Defined in:
lib/verge/crypto.rb

Instance Method Summary collapse

Instance Method Details

#digest(*values) ⇒ Object

nodoc #



11
12
13
# File 'lib/verge/crypto.rb', line 11

def digest(*values) # nodoc #
  Digest::SHA512.hexdigest values.join
end

#tokenObject

nodoc #



7
8
9
# File 'lib/verge/crypto.rb', line 7

def token # nodoc #
  Digest::SHA512.hexdigest((1..10).collect{ rand.to_s }.join + Time.now.usec.to_s)
end