Module: Cloudquery::Crypto::URLSafeSHA1

Extended by:
URLSafeSHA1
Included in:
URLSafeSHA1
Defined in:
lib/cloudquery.rb

Instance Method Summary collapse

Instance Method Details

#sign(*tokens) ⇒ Object



116
117
118
119
120
# File 'lib/cloudquery.rb', line 116

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