Module: CloudQuery::Crypto::URLSafeSHA1

Extended by:
URLSafeSHA1
Included in:
URLSafeSHA1
Defined in:
lib/cloud_query/crypto.rb

Instance Method Summary collapse

Instance Method Details

#sign(*tokens) ⇒ Object



21
22
23
24
25
# File 'lib/cloud_query/crypto.rb', line 21

def sign(*tokens)
  tokens = tokens.flatten
  digest = Digest::SHA1.digest(tokens.join)
  Base64.encode64(digest).chomp.tr('+/', '-_')
end