private EncryptionResult EncryptPayload(WebPushSubscription subscription, string payload) { if (string.IsNullOrEmpty(payload)) { return(null); } subscription.Validate(); var keys = subscription.Keys; return(Encryptor.Encrypt(keys.P256dh, keys.Auth, payload)); }
public WebPushNotification(WebPushSubscription subscription) { Subscription = subscription; }