Braintree.Webhook.Digest (Braintree v0.13.0)

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

Link to this section 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.

Link to this section Functions

Link to this function

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.

Link to this function

secure_compare(left, right)

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

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