Module: Cryptomus::Signature

Defined in:
lib/cryptomus/signature.rb

Class Method Summary collapse

Class Method Details

.generate(raw_body) ⇒ String

Parameters:

  • raw_body (String)

Returns:

  • (String)


13
14
15
16
# File 'lib/cryptomus/signature.rb', line 13

def generate(raw_body)
  raw_body_encoded = Base64.strict_encode64(raw_body || '')
  Digest::MD5.hexdigest("#{raw_body_encoded}#{Cryptomus.config.api_key}")
end