module Ivona::GetMd5
Public Class Methods
formula(token)
click to toggle source
Formula for md5 param is: md5( md5( api_key ) + token )
# File lib/ivona/get_md5.rb, line 9 def formula(token) api_key = Ivona::Config.api_key api_key_as_md5 = to_md5( api_key ) to_md5( api_key_as_md5 + token ) end
to_md5(a_string)
click to toggle source
Helper method to transform a string to MD5
# File lib/ivona/get_md5.rb, line 4 def to_md5(a_string) Digest::MD5.hexdigest(a_string) end