Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Feature Request: Add Utility Method for Webhook Event Hash Verification #37

Open
mullen3 opened this issue Jun 30, 2016 · 0 comments
Open
Labels
legacy Related to legacy, non-OpenAPI SDK

Comments

@mullen3
Copy link

mullen3 commented Jun 30, 2016

The verification of a given event hash through HMAC could be added to this SDK as a nice utility method.

def trusted_event?(event_data)
    calculated_digest = OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new('sha256'), HelloSign.api_key, (event_data[:event_time] + event_data[:event_type]))
    return calculated_digest == event_data[:event_hash]
end
@jtreminio-dropbox jtreminio-dropbox added the legacy Related to legacy, non-OpenAPI SDK label Mar 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
legacy Related to legacy, non-OpenAPI SDK
Projects
None yet
Development

No branches or pull requests

2 participants