• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rwjdk / TrelloDotNet / 23503848039

24 Mar 2026 05:41PM UTC coverage: 79.11% (-1.3%) from 80.414%
23503848039

push

github

rwjdk
## 2.4.0 (24th of March 2026)
- Added support for the new Recurring Due System (Warning: This seems to not be part of the official API (do not use the api.trello.com endpoint) but can still be set, but Atlassian might not promise backward compatibility / that this endpoint stay available to us)
  - `SetRecurringDueDateAsync` + `RemoveRecurringDueDateAsync`

2634 of 3612 branches covered (72.92%)

Branch coverage included in aggregate %.

300 of 404 new or added lines in 62 files covered. (74.26%)

21 existing lines in 6 files now uncovered.

4671 of 5622 relevant lines covered (83.08%)

149.64 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/TrelloDotNet/Control/Webhook/WebhookSignatureValidator.cs
1
using System;
2
using System.Linq;
3
using System.Security.Cryptography;
4
using System.Text;
5

6
namespace TrelloDotNet.Control.Webhook
7
{
8
    internal static class WebhookSignatureValidator
9
    {
10
        private static byte[] Digest(byte[] data, int dataIndex, int dataLength, string secret)
11
        {
NEW
12
            HMACSHA1 hmac = new HMACSHA1(Encoding.UTF8.GetBytes(secret));
×
13
            return hmac.ComputeHash(data, dataIndex, dataLength);
×
14
        }
15

16
        internal static bool ValidateSignature(string json, string signature, string webhookUrl, string secret)
17
        {
18
            if (json == null)
×
19
                throw new ArgumentNullException(nameof(json));
×
20
            if (signature == null)
×
21
                throw new ArgumentNullException(nameof(signature));
×
22
            if (webhookUrl == null)
×
23
                throw new ArgumentNullException(nameof(webhookUrl));
×
24
            if (secret == null)
×
25
                throw new ArgumentNullException(nameof(secret), "You must provide an API secret to use Webhook Signature Validation. Please set TrelloClientOptions.Secret");
×
26

NEW
27
            int payloadLength = Encoding.UTF8.GetByteCount(json) + Encoding.UTF8.GetByteCount(webhookUrl);
×
NEW
28
            byte[] payloadBytes = new byte[payloadLength];
×
NEW
29
            int payloadBytesWritten = Encoding.UTF8.GetBytes(json, 0, json.Length, payloadBytes, 0);
×
30
            payloadBytesWritten += Encoding.UTF8.GetBytes(webhookUrl, 0, webhookUrl.Length, payloadBytes, payloadBytesWritten);
×
NEW
31
            byte[] hashBytes = Digest(payloadBytes, 0, payloadBytesWritten, secret);
×
NEW
32
            byte[] signatureBytes = Convert.FromBase64String(signature);
×
UNCOV
33
            return hashBytes.SequenceEqual(signatureBytes);
×
34
        }
35
    }
36
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc