Braintree.Webhook.Digest (Braintree v0.16.0)

This module provides convenience methods to help validate Braintree signatures and associated payloads for webhooks.

Summary

Functions

Returns the message as a hex-encoded string to validate it matches the signature from the braintree webhook event.

A wrapper function that does a secure comparision accounting for timing attacks.

Functions

hexdigest(private_key, message)

@spec hexdigest(String.t() | nil, String.t() | nil) :: String.t()

Returns the message as a hex-encoded string to validate it matches the signature from the braintree webhook event.

secure_compare(left, right)

@spec secure_compare(String.t(), String.t()) :: boolean()

A wrapper function that does a secure comparision accounting for timing attacks.